chore: update stage0
This commit is contained in:
parent
0af0957af4
commit
96e580a653
2 changed files with 352 additions and 0 deletions
12
stage0/src/Lean/Elab/BuiltinNotation.lean
generated
12
stage0/src/Lean/Elab/BuiltinNotation.lean
generated
|
|
@ -78,6 +78,12 @@ private def elabParserMacroAux (prec : Syntax) (e : Syntax) : TermElabM Syntax :
|
|||
| `(parser! : $prec $e) => elabParserMacroAux prec e
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[builtinTermElab «leading_parser»] def elabLeadingParserMacro : TermElab :=
|
||||
adaptExpander fun stx => match stx with
|
||||
| `(leading_parser $e) => elabParserMacroAux (quote Parser.maxPrec) e
|
||||
| `(leading_parser : $prec $e) => elabParserMacroAux prec e
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
private def elabTParserMacroAux (prec : Syntax) (e : Syntax) : TermElabM Syntax := do
|
||||
let declName? ← getDeclName?
|
||||
match declName? with
|
||||
|
|
@ -90,6 +96,12 @@ private def elabTParserMacroAux (prec : Syntax) (e : Syntax) : TermElabM Syntax
|
|||
| `(tparser! : $prec $e) => elabTParserMacroAux prec e
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[builtinTermElab «trailing_parser»] def elabTrailingParserMacro : TermElab :=
|
||||
adaptExpander fun stx => match stx with
|
||||
| `(trailing_parser $e) => elabTParserMacroAux (quote Parser.maxPrec) e
|
||||
| `(trailing_parser : $prec $e) => elabTParserMacroAux prec e
|
||||
| _ => throwUnsupportedSyntax
|
||||
|
||||
@[builtinTermElab panic] def elabPanic : TermElab := fun stx expectedType? => do
|
||||
let arg := stx[1]
|
||||
let pos ← getRefPosition
|
||||
|
|
|
|||
340
stage0/stdlib/Lean/Elab/BuiltinNotation.c
generated
340
stage0/stdlib/Lean/Elab/BuiltinNotation.c
generated
|
|
@ -65,6 +65,7 @@ lean_object* l_Lean_Elab_Term_elabSorry___closed__10;
|
|||
extern lean_object* l_Lean_Parser_Term_anonymousCtor___elambda__1___closed__2;
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__12;
|
||||
extern lean_object* l_Array_empty___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabLeadingParserMacro(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandAssert_match__1(lean_object*);
|
||||
lean_object* lean_environment_find(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandEmptyC___closed__8;
|
||||
|
|
@ -86,6 +87,7 @@ extern lean_object* l_Lean_Parser_Term_parser_x21___elambda__1___closed__2;
|
|||
lean_object* l___regBuiltin_Lean_Elab_Term_expandAssert___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_expandEmptyC___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabParen___closed__3;
|
||||
extern lean_object* l_Lean_Parser_Term_leading__parser___elambda__1___closed__2;
|
||||
lean_object* lean_expr_instantiate1(lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux_match__1___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_push(lean_object*, lean_object*);
|
||||
|
|
@ -113,6 +115,7 @@ extern lean_object* l_myMacro____x40_Init_Notation___hyg_15387____closed__9;
|
|||
lean_object* l_Lean_Elab_Term_expandDbgTrace___closed__1;
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__39;
|
||||
lean_object* l_Lean_Elab_Term_elabAnonymousCtor_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabTrailingParserMacro___closed__1;
|
||||
extern lean_object* l_Lean_Meta_assert___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__2;
|
||||
lean_object* lean_string_utf8_byte_size(lean_object*);
|
||||
|
|
@ -135,6 +138,7 @@ lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at_myMacro____x40_Init_Notation_
|
|||
lean_object* l_Lean_Elab_Term_ensureHasType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabSubst___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__16;
|
||||
lean_object* l_Lean_Elab_Term_elabLeadingParserMacro___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandAssert(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabSubst___closed__3;
|
||||
|
|
@ -188,6 +192,7 @@ lean_object* l_Lean_Elab_Term_expandShow___boxed(lean_object*, lean_object*, lea
|
|||
lean_object* l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabCDot___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_instQuoteProd___rarg___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_expandDbgTrace(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabTrailingParserMacro(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_mkPairs_loop___closed__1;
|
||||
extern lean_object* l_myMacro____x40_Init_Notation___hyg_13868____closed__9;
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux___closed__10;
|
||||
|
|
@ -237,6 +242,7 @@ lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabCDot(le
|
|||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux_match__1(lean_object*);
|
||||
lean_object* l_Lean_Elab_addMacroStack___at_Lean_Elab_Term_instAddErrorMessageContextTermElabM___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabParen___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabLeadingParserMacro___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabParen___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_maxPrec;
|
||||
lean_object* l_Lean_Elab_Term_elabSubst___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -255,6 +261,7 @@ lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserM
|
|||
lean_object* l_Lean_Elab_Term_elabAnonymousCtor___closed__3;
|
||||
lean_object* l___private_Init_Meta_0__Lean_quoteName(lean_object*);
|
||||
lean_object* l_Lean_Syntax_mkStrLit(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabTrailingParserMacro___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Term_have___elambda__1___closed__1;
|
||||
extern lean_object* l_Lean_instToExprUnit___lambda__1___closed__3;
|
||||
lean_object* l_Lean_FileMap_toPosition(lean_object*, lean_object*);
|
||||
|
|
@ -262,6 +269,7 @@ lean_object* l___regBuiltin_Lean_Elab_Term_expandDbgTrace___closed__1;
|
|||
lean_object* l_Lean_MonadRef_mkInfoFromRefPos___at___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_expandCDot___spec__2___boxed(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabSubst_match__1(lean_object*);
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__6;
|
||||
lean_object* l_Lean_Elab_Term_elabLeadingParserMacro___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_KernelException_toMessageData___closed__15;
|
||||
extern lean_object* l_Lean_instInhabitedSyntax;
|
||||
extern lean_object* l_Lean_Parser_Term_dbgTrace___elambda__1___closed__1;
|
||||
|
|
@ -287,6 +295,7 @@ lean_object* l_Lean_Elab_Term_elabSubst___lambda__5(lean_object*, lean_object*,
|
|||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__22;
|
||||
lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__29;
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabTrailingParserMacro(lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabParserMacro___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_elabStateRefT___lambda__2___closed__7;
|
||||
lean_object* l_Lean_Elab_Term_expandSuffices___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -316,6 +325,7 @@ lean_object* l_Lean_Elab_Term_elabTParserMacro(lean_object*, lean_object*, lean_
|
|||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_elabStateRefT___lambda__2___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_elabSorry___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabTrailingParserMacro___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_myMacro____x40_Init_Notation___hyg_2191____closed__4;
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux___closed__7;
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_expandShow(lean_object*);
|
||||
|
|
@ -378,6 +388,7 @@ extern lean_object* l_Lean_Parser_Tactic_case___closed__7;
|
|||
lean_object* l_Lean_Meta_isExprDefEq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Lean_Meta_Basic_0__Lean_Meta_mkFreshExprMVarImpl(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_myMacro____x40_Init_Notation___hyg_1398____closed__8;
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabLeadingParserMacro(lean_object*);
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__9;
|
||||
lean_object* l_Lean_Elab_getRefPos___at_Lean_Elab_Term_elabPanic___spec__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandSuffices___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -399,6 +410,7 @@ lean_object* l_Lean_Elab_Term_elabSorry___closed__9;
|
|||
lean_object* l_Lean_Elab_Term_mkPairs___boxed(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_prec_x28___x29___closed__7;
|
||||
lean_object* l_Lean_Elab_Term_elabSubst___closed__2;
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabTrailingParserMacro___closed__1;
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux___closed__8;
|
||||
lean_object* l_Lean_Elab_Term_elabPanic___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabParserMacro___closed__1;
|
||||
|
|
@ -407,6 +419,7 @@ lean_object* l_Lean_Elab_Term_elabAnonymousCtor___closed__5;
|
|||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_hasCDot_match__1(lean_object*);
|
||||
extern lean_object* l_prec_x28___x29___closed__3;
|
||||
lean_object* l_Lean_Elab_Term_elabStateRefT(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Parser_Term_trailing__parser___elambda__1___closed__2;
|
||||
lean_object* l_Lean_Elab_Term_mkPairs_loop(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandUnreachable___rarg___closed__1;
|
||||
lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*);
|
||||
|
|
@ -463,6 +476,7 @@ lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParser
|
|||
lean_object* l_Lean_throwError___at___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabCDot___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Elab_Term_expandAssert___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabSubst_match__2___rarg(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabLeadingParserMacro___closed__1;
|
||||
lean_object* l_Lean_Elab_Term_elabSubst___closed__6;
|
||||
lean_object* l_Lean_Meta_withLocalDecl___at_Lean_Elab_Term_elabLetDeclAux___spec__3___rarg(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabAnonymousCtor___closed__1;
|
||||
|
|
@ -4249,6 +4263,162 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_elabLeadingParserMacro___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_9; uint8_t x_10;
|
||||
x_9 = l_Lean_Parser_Term_leading__parser___elambda__1___closed__2;
|
||||
lean_inc(x_1);
|
||||
x_10 = l_Lean_Syntax_isOfKind(x_1, x_9);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
lean_object* x_11;
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_11 = l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___spec__1___rarg(x_8);
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_27; uint8_t x_28;
|
||||
x_12 = lean_unsigned_to_nat(1u);
|
||||
x_13 = l_Lean_Syntax_getArg(x_1, x_12);
|
||||
x_27 = l_Lean_nullKind___closed__2;
|
||||
lean_inc(x_13);
|
||||
x_28 = l_Lean_Syntax_isOfKind(x_13, x_27);
|
||||
if (x_28 == 0)
|
||||
{
|
||||
lean_object* x_29;
|
||||
x_29 = lean_box(0);
|
||||
x_14 = x_29;
|
||||
goto block_26;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33;
|
||||
x_30 = l_Lean_Syntax_getArgs(x_13);
|
||||
x_31 = lean_array_get_size(x_30);
|
||||
lean_dec(x_30);
|
||||
x_32 = lean_unsigned_to_nat(0u);
|
||||
x_33 = lean_nat_dec_eq(x_31, x_32);
|
||||
lean_dec(x_31);
|
||||
if (x_33 == 0)
|
||||
{
|
||||
lean_object* x_34;
|
||||
x_34 = lean_box(0);
|
||||
x_14 = x_34;
|
||||
goto block_26;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38;
|
||||
lean_dec(x_13);
|
||||
x_35 = lean_unsigned_to_nat(2u);
|
||||
x_36 = l_Lean_Syntax_getArg(x_1, x_35);
|
||||
lean_dec(x_1);
|
||||
x_37 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__2;
|
||||
x_38 = l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux(x_37, x_36, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
|
||||
return x_38;
|
||||
}
|
||||
}
|
||||
block_26:
|
||||
{
|
||||
lean_object* x_15; uint8_t x_16;
|
||||
lean_dec(x_14);
|
||||
x_15 = l_Lean_nullKind___closed__2;
|
||||
lean_inc(x_13);
|
||||
x_16 = l_Lean_Syntax_isOfKind(x_13, x_15);
|
||||
if (x_16 == 0)
|
||||
{
|
||||
lean_object* x_17;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_17 = l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___spec__1___rarg(x_8);
|
||||
return x_17;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21;
|
||||
x_18 = l_Lean_Syntax_getArgs(x_13);
|
||||
x_19 = lean_array_get_size(x_18);
|
||||
lean_dec(x_18);
|
||||
x_20 = lean_unsigned_to_nat(2u);
|
||||
x_21 = lean_nat_dec_eq(x_19, x_20);
|
||||
lean_dec(x_19);
|
||||
if (x_21 == 0)
|
||||
{
|
||||
lean_object* x_22;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_22 = l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___spec__1___rarg(x_8);
|
||||
return x_22;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
x_23 = l_Lean_Syntax_getArg(x_13, x_12);
|
||||
lean_dec(x_13);
|
||||
x_24 = l_Lean_Syntax_getArg(x_1, x_20);
|
||||
lean_dec(x_1);
|
||||
x_25 = l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabParserMacroAux(x_23, x_24, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
|
||||
return x_25;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_elabLeadingParserMacro___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLeadingParserMacro___lambda__1___boxed), 8, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_elabLeadingParserMacro(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11;
|
||||
x_10 = l_Lean_Elab_Term_elabLeadingParserMacro___closed__1;
|
||||
x_11 = l_Lean_Elab_Term_adaptExpander(x_10, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
|
||||
return x_11;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_elabLeadingParserMacro___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_9;
|
||||
x_9 = l_Lean_Elab_Term_elabLeadingParserMacro___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabLeadingParserMacro___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabLeadingParserMacro), 9, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabLeadingParserMacro(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_2 = l_Lean_Elab_Term_termElabAttribute;
|
||||
x_3 = l_Lean_Parser_Term_leading__parser___elambda__1___closed__2;
|
||||
x_4 = l___regBuiltin_Lean_Elab_Term_elabLeadingParserMacro___closed__1;
|
||||
x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux_match__1___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -4663,6 +4833,162 @@ x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
|
|||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_elabTrailingParserMacro___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_9; uint8_t x_10;
|
||||
x_9 = l_Lean_Parser_Term_trailing__parser___elambda__1___closed__2;
|
||||
lean_inc(x_1);
|
||||
x_10 = l_Lean_Syntax_isOfKind(x_1, x_9);
|
||||
if (x_10 == 0)
|
||||
{
|
||||
lean_object* x_11;
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_11 = l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___spec__1___rarg(x_8);
|
||||
return x_11;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_27; uint8_t x_28;
|
||||
x_12 = lean_unsigned_to_nat(1u);
|
||||
x_13 = l_Lean_Syntax_getArg(x_1, x_12);
|
||||
x_27 = l_Lean_nullKind___closed__2;
|
||||
lean_inc(x_13);
|
||||
x_28 = l_Lean_Syntax_isOfKind(x_13, x_27);
|
||||
if (x_28 == 0)
|
||||
{
|
||||
lean_object* x_29;
|
||||
x_29 = lean_box(0);
|
||||
x_14 = x_29;
|
||||
goto block_26;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_30; lean_object* x_31; lean_object* x_32; uint8_t x_33;
|
||||
x_30 = l_Lean_Syntax_getArgs(x_13);
|
||||
x_31 = lean_array_get_size(x_30);
|
||||
lean_dec(x_30);
|
||||
x_32 = lean_unsigned_to_nat(0u);
|
||||
x_33 = lean_nat_dec_eq(x_31, x_32);
|
||||
lean_dec(x_31);
|
||||
if (x_33 == 0)
|
||||
{
|
||||
lean_object* x_34;
|
||||
x_34 = lean_box(0);
|
||||
x_14 = x_34;
|
||||
goto block_26;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38;
|
||||
lean_dec(x_13);
|
||||
x_35 = lean_unsigned_to_nat(2u);
|
||||
x_36 = l_Lean_Syntax_getArg(x_1, x_35);
|
||||
lean_dec(x_1);
|
||||
x_37 = l_Lean_Elab_Term_elabParserMacro___lambda__1___closed__2;
|
||||
x_38 = l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux(x_37, x_36, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
|
||||
return x_38;
|
||||
}
|
||||
}
|
||||
block_26:
|
||||
{
|
||||
lean_object* x_15; uint8_t x_16;
|
||||
lean_dec(x_14);
|
||||
x_15 = l_Lean_nullKind___closed__2;
|
||||
lean_inc(x_13);
|
||||
x_16 = l_Lean_Syntax_isOfKind(x_13, x_15);
|
||||
if (x_16 == 0)
|
||||
{
|
||||
lean_object* x_17;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_17 = l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___spec__1___rarg(x_8);
|
||||
return x_17;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21;
|
||||
x_18 = l_Lean_Syntax_getArgs(x_13);
|
||||
x_19 = lean_array_get_size(x_18);
|
||||
lean_dec(x_18);
|
||||
x_20 = lean_unsigned_to_nat(2u);
|
||||
x_21 = lean_nat_dec_eq(x_19, x_20);
|
||||
lean_dec(x_19);
|
||||
if (x_21 == 0)
|
||||
{
|
||||
lean_object* x_22;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_22 = l_Lean_Elab_throwUnsupportedSyntax___at___private_Lean_Elab_Binders_0__Lean_Elab_Term_expandBinderModifier___spec__1___rarg(x_8);
|
||||
return x_22;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
x_23 = l_Lean_Syntax_getArg(x_13, x_12);
|
||||
lean_dec(x_13);
|
||||
x_24 = l_Lean_Syntax_getArg(x_1, x_20);
|
||||
lean_dec(x_1);
|
||||
x_25 = l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux(x_23, x_24, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
|
||||
return x_25;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_Term_elabTrailingParserMacro___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTrailingParserMacro___lambda__1___boxed), 8, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_elabTrailingParserMacro(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11;
|
||||
x_10 = l_Lean_Elab_Term_elabTrailingParserMacro___closed__1;
|
||||
x_11 = l_Lean_Elab_Term_adaptExpander(x_10, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9);
|
||||
return x_11;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_Term_elabTrailingParserMacro___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_9;
|
||||
x_9 = l_Lean_Elab_Term_elabTrailingParserMacro___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
return x_9;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l___regBuiltin_Lean_Elab_Term_elabTrailingParserMacro___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabTrailingParserMacro), 9, 0);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
lean_object* l___regBuiltin_Lean_Elab_Term_elabTrailingParserMacro(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5;
|
||||
x_2 = l_Lean_Elab_Term_termElabAttribute;
|
||||
x_3 = l_Lean_Parser_Term_trailing__parser___elambda__1___closed__2;
|
||||
x_4 = l___regBuiltin_Lean_Elab_Term_elabTrailingParserMacro___closed__1;
|
||||
x_5 = l_Lean_KeyedDeclsAttribute_addBuiltin___rarg(x_2, x_3, x_4, x_1);
|
||||
return x_5;
|
||||
}
|
||||
}
|
||||
lean_object* l_Lean_Elab_getRefPos___at_Lean_Elab_Term_elabPanic___spec__2___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -10918,6 +11244,13 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabParserMacro___closed__1);
|
|||
res = l___regBuiltin_Lean_Elab_Term_elabParserMacro(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Term_elabLeadingParserMacro___closed__1 = _init_l_Lean_Elab_Term_elabLeadingParserMacro___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_elabLeadingParserMacro___closed__1);
|
||||
l___regBuiltin_Lean_Elab_Term_elabLeadingParserMacro___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_elabLeadingParserMacro___closed__1();
|
||||
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabLeadingParserMacro___closed__1);
|
||||
res = l___regBuiltin_Lean_Elab_Term_elabLeadingParserMacro(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux___closed__1 = _init_l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux___closed__1();
|
||||
lean_mark_persistent(l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux___closed__1);
|
||||
l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux___closed__2 = _init_l___private_Lean_Elab_BuiltinNotation_0__Lean_Elab_Term_elabTParserMacroAux___closed__2();
|
||||
|
|
@ -10945,6 +11278,13 @@ lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabTParserMacro___closed__1)
|
|||
res = l___regBuiltin_Lean_Elab_Term_elabTParserMacro(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Term_elabTrailingParserMacro___closed__1 = _init_l_Lean_Elab_Term_elabTrailingParserMacro___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_elabTrailingParserMacro___closed__1);
|
||||
l___regBuiltin_Lean_Elab_Term_elabTrailingParserMacro___closed__1 = _init_l___regBuiltin_Lean_Elab_Term_elabTrailingParserMacro___closed__1();
|
||||
lean_mark_persistent(l___regBuiltin_Lean_Elab_Term_elabTrailingParserMacro___closed__1);
|
||||
res = l___regBuiltin_Lean_Elab_Term_elabTrailingParserMacro(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
l_Lean_Elab_Term_elabPanic___closed__1 = _init_l_Lean_Elab_Term_elabPanic___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_Term_elabPanic___closed__1);
|
||||
l_Lean_Elab_Term_elabPanic___closed__2 = _init_l_Lean_Elab_Term_elabPanic___closed__2();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue