moonbitlang/parser/syntax does not have a README file
pub(open) trait IterVisitor {
fn base(Self) -> IterVisitorBase[Self] = _
fn visit_Visibility(Self, Visibility) -> Unit = _
fn visit_Visibility_Pub(Self, attr~ : String?, loc~ : Location) -> Unit = _
fn visit_Visibility_Priv(Self, loc~ : Location) -> Unit = _
fn visit_Constant(Self, Constant) -> Unit = _
fn visit_Label(Self, Label) -> Unit = _
fn visit_ConstrName(Self, ConstrName) -> Unit = _
fn visit_LongIdent(Self, LongIdent) -> Unit = _
fn visit_LongIdent_Ident(Self, name~ : String) -> Unit = _
fn visit_LongIdent_Dot(Self, pkg~ : String, id~ : String) -> Unit = _
fn visit_TypeName(Self, TypeName) -> Unit = _
fn visit_ConstrId(Self, ConstrId) -> Unit = _
fn visit_Type(Self, Type) -> Unit = _
fn visit_Type_Any(Self, loc~ : Location) -> Unit = _
fn visit_Type_Arrow(Self, args~ : List[Type], res~ : Type, err~ : ErrorType, is_async~ : Location?, loc~ : Location) -> Unit = _
fn visit_Type_Name(Self, constr_id~ : ConstrId, tys~ : List[Type], loc~ : Location) -> Unit = _
fn visit_Type_Tuple(Self, tys~ : List[Type], loc~ : Location) -> Unit = _
fn visit_Type_Option(Self, ty~ : Type, loc~ : Location, question_loc~ : Location) -> Unit = _
fn visit_Type_Object(Self, ConstrId) -> Unit = _
fn visit_ErrorType(Self, ErrorType) -> Unit = _
fn visit_ErrorType_ErrorType(Self, ty~ : Type) -> Unit = _
fn visit_ErrorType_DefaultErrorType(Self, loc~ : Location) -> Unit = _
fn visit_ErrorType_Noraise(Self, loc~ : Location) -> Unit = _
fn visit_ErrorType_MaybeError(Self, ty~ : Type) -> Unit = _
fn visit_ConstrParam(Self, ConstrParam) -> Unit = _
fn visit_ConstrDecl(Self, ConstrDecl) -> Unit = _
fn visit_ExceptionDecl(Self, ExceptionDecl) -> Unit = _
fn visit_ExceptionDecl_EnumPayload(Self, List[ConstrDecl]) -> Unit = _
fn visit_FieldName(Self, FieldName) -> Unit = _
fn visit_FieldDecl(Self, FieldDecl) -> Unit = _
fn visit_TypeDesc(Self, TypeDesc) -> Unit = _
fn visit_TypeDesc_Error(Self, ExceptionDecl) -> Unit = _
fn visit_TypeDesc_Variant(Self, List[ConstrDecl]) -> Unit = _
fn visit_TypeDesc_Record(Self, fields~ : List[FieldDecl]) -> Unit = _
fn visit_TypeDesc_TupleStruct(Self, List[Type]) -> Unit = _
fn visit_TypeDesc_Alias(Self, Type) -> Unit = _
fn visit_Hole(Self, Hole) -> Unit = _
fn visit_ArgumentKind(Self, ArgumentKind) -> Unit = _
fn visit_ArgumentKind_Labelled(Self, Label) -> Unit = _
fn visit_ArgumentKind_LabelledPun(Self, Label) -> Unit = _
fn visit_ArgumentKind_LabelledOption(Self, label~ : Label, question_loc~ : Location) -> Unit = _
fn visit_ArgumentKind_LabelledOptionPun(Self, label~ : Label, question_loc~ : Location) -> Unit = _
fn visit_FnKind(Self, FnKind) -> Unit = _
fn visit_Group(Self, Group) -> Unit = _
fn visit_TrailingMark(Self, TrailingMark) -> Unit = _
fn visit_TypeVarConstraint(Self, TypeVarConstraint) -> Unit = _
fn visit_TypeVarBinder(Self, TypeVarBinder) -> Unit = _
fn visit_TypeDeclBinder(Self, TypeDeclBinder) -> Unit = _
fn visit_Binder(Self, Binder) -> Unit = _
fn visit_Var(Self, Var) -> Unit = _
fn visit_ConstructorExtraInfo(Self, ConstructorExtraInfo) -> Unit = _
fn visit_ConstructorExtraInfo_TypeName(Self, TypeName) -> Unit = _
fn visit_ConstructorExtraInfo_Package(Self, String) -> Unit = _
fn visit_Constructor(Self, Constructor) -> Unit = _
fn visit_Accessor(Self, Accessor) -> Unit = _
fn visit_Accessor_Label(Self, Label) -> Unit = _
fn visit_Accessor_Index(Self, tuple_index~ : Int, loc~ : Location) -> Unit = _
fn visit_Accessor_Newtype(Self, loc~ : Location) -> Unit = _
fn visit_AliasTarget(Self, AliasTarget) -> Unit = _
fn visit_Argument(Self, Argument) -> Unit = _
fn visit_Parameter(Self, Parameter) -> Unit = _
fn visit_Parameter_DiscardPositional(Self, ty~ : Type?, loc~ : Location) -> Unit = _
fn visit_Parameter_Positional(Self, binder~ : Binder, ty~ : Type?) -> Unit = _
fn visit_Parameter_Labelled(Self, binder~ : Binder, ty~ : Type?) -> Unit = _
fn visit_Parameter_Optional(Self, binder~ : Binder, default~ : Expr, ty~ : Type?) -> Unit = _
fn visit_Parameter_QuestionOptional(Self, binder~ : Binder, ty~ : Type?) -> Unit = _
fn visit_Case(Self, Case) -> Unit = _
fn visit_LexCase(Self, LexCase) -> Unit = _
fn visit_LexTopPattern(Self, LexTopPattern) -> Unit = _
fn visit_LexTopPattern_Pattern(Self, LexPattern) -> Unit = _
fn visit_LexTopPattern_Binder(Self, Binder) -> Unit = _
fn visit_LexTopPattern_Wildcard(Self, loc~ : Location) -> Unit = _
fn visit_LexPattern(Self, LexPattern) -> Unit = _
fn visit_LexPattern_Regex(Self, lit~ : String, offset~ : Int, loc~ : Location) -> Unit = _
fn visit_LexPattern_RegexInterp(Self, elems~ : List[InterpElem], loc~ : Location) -> Unit = _
fn visit_LexPattern_ConstantRef(Self, lid~ : LongIdent, loc~ : Location) -> Unit = _
fn visit_LexPattern_Alias(Self, pat~ : LexPattern, binder~ : Binder, loc~ : Location) -> Unit = _
fn visit_LexPattern_Sequence(Self, pats~ : List[LexPattern], loc~ : Location) -> Unit = _
fn visit_SpreadableElem(Self, SpreadableElem) -> Unit = _
fn visit_SpreadableElem_Regular(Self, Expr) -> Unit = _
fn visit_SpreadableElem_Spread(Self, expr~ : Expr, loc~ : Location) -> Unit = _
fn visit_MapExprElem(Self, MapExprElem) -> Unit = _
fn visit_StaticAssertion(Self, StaticAssertion) -> Unit = _
fn visit_Func(Self, Func) -> Unit = _
fn visit_FieldDef(Self, FieldDef) -> Unit = _
fn visit_InterpElem(Self, InterpElem) -> Unit = _
fn visit_InterpElem_Literal(Self, repr~ : String, loc~ : Location) -> Unit = _
fn visit_InterpElem_Expr(Self, expr~ : Expr, loc~ : Location) -> Unit = _
fn visit_InterpElem_Source(Self, InterpSource) -> Unit = _
fn visit_MultilineStringElem(Self, MultilineStringElem) -> Unit = _
fn visit_MultilineStringElem_String(Self, String) -> Unit = _
fn visit_MultilineStringElem_Interp(Self, List[InterpElem]) -> Unit = _
fn visit_TryOperatorKind(Self, TryOperatorKind) -> Unit = _
fn visit_DotDotBinder(Self, DotDotBinder) -> Unit = _
fn visit_DotDotBinder_BinderAs(Self, Binder) -> Unit = _
fn visit_DotDotBinder_Binder(Self, Binder) -> Unit = _
fn visit_ArrayPattern(Self, ArrayPattern) -> Unit = _
fn visit_ArrayPattern_Pattern(Self, Pattern) -> Unit = _
fn visit_ArrayPattern_StringSpread(Self, str~ : String, loc~ : Location) -> Unit = _
fn visit_ArrayPattern_BytesSpread(Self, bytes~ : String, loc~ : Location) -> Unit = _
fn visit_ArrayPattern_ConstSpread(Self, binder~ : Binder, pkg~ : String?, loc~ : Location) -> Unit = _
fn visit_ArrayPatterns(Self, ArrayPatterns) -> Unit = _
fn visit_ArrayPatterns_Closed(Self, List[ArrayPattern]) -> Unit = _
fn visit_ArrayPatterns_Open(Self, List[ArrayPattern], List[ArrayPattern], DotDotBinder) -> Unit = _
fn visit_WhereClause(Self, WhereClause) -> Unit = _
fn visit_FieldPat(Self, FieldPat) -> Unit = _
fn visit_ConstrPatArg(Self, ConstrPatArg) -> Unit = _
fn visit_MapPatElem(Self, MapPatElem) -> Unit = _
fn visit_RangeKind(Self, RangeKind) -> Unit = _
fn visit_Pattern(Self, Pattern) -> Unit = _
fn visit_Pattern_Alias(Self, pat~ : Pattern, alias_~ : Binder, loc~ : Location) -> Unit = _
fn visit_Pattern_Any(Self, loc~ : Location) -> Unit = _
fn visit_Pattern_Array(Self, pats~ : ArrayPatterns, loc~ : Location) -> Unit = _
fn visit_Pattern_Constant(Self, c~ : Constant, loc~ : Location) -> Unit = _
fn visit_Pattern_Constraint(Self, pat~ : Pattern, ty~ : Type, loc~ : Location) -> Unit = _
fn visit_Pattern_Constr(Self, constr~ : Constructor, args~ : List[ConstrPatArg]?, is_open~ : Bool, loc~ : Location) -> Unit = _
fn visit_Pattern_Or(Self, pat1~ : Pattern, pat2~ : Pattern, loc~ : Location) -> Unit = _
fn visit_Pattern_Tuple(Self, pats~ : List[Pattern], loc~ : Location) -> Unit = _
fn visit_Pattern_Var(Self, Binder) -> Unit = _
fn visit_Pattern_Record(Self, fields~ : List[FieldPat], is_closed~ : Bool, loc~ : Location) -> Unit = _
fn visit_Pattern_Map(Self, elems~ : List[MapPatElem], is_closed~ : Bool, loc~ : Location) -> Unit = _
fn visit_Pattern_Range(Self, lhs~ : Pattern, rhs~ : Pattern, kind~ : RangeKind, loc~ : Location) -> Unit = _
fn visit_Pattern_With(Self, pat~ : Pattern, bindings~ : List[(Binder, Expr)], loc~ : Location) -> Unit = _
fn visit_Pattern_SpecialConstr(Self, binder~ : Binder, args~ : List[ConstrPatArg], loc~ : Location) -> Unit = _
fn visit_DerivingDirective(Self, DerivingDirective) -> Unit = _
fn visit_TypeDecl(Self, TypeDecl) -> Unit = _
fn visit_FuncStubs(Self, FuncStubs) -> Unit = _
fn visit_FuncStubs_Import(Self, module_name~ : String, func_name~ : String, language~ : String?) -> Unit = _
fn visit_FuncStubs_Embedded(Self, language~ : String?, code~ : EmbeddedCode) -> Unit = _
fn visit_EmbeddedCode(Self, EmbeddedCode) -> Unit = _
fn visit_EmbeddedCode_CodeString(Self, String) -> Unit = _
fn visit_EmbeddedCode_CodeMultilineString(Self, List[String]) -> Unit = _
fn visit_DeclBody(Self, DeclBody) -> Unit = _
fn visit_DeclBody_DeclBody(Self, expr~ : Expr) -> Unit = _
fn visit_DeclBody_DeclStubs(Self, FuncStubs) -> Unit = _
fn visit_FunDecl(Self, FunDecl) -> Unit = _
fn visit_TraitMethodDecl(Self, TraitMethodDecl) -> Unit = _
fn visit_TraitDecl(Self, TraitDecl) -> Unit = _
fn visit_Impl(Self, Impl) -> Unit = _
fn visit_Impl_TopExpr(Self, expr~ : Expr, is_main~ : Bool, is_async~ : Location?, loc~ : Location) -> Unit = _
fn visit_Impl_TopTest(Self, expr~ : Expr, name~ : (String, Location)?, params~ : List[Parameter]?, is_async~ : Location?, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString) -> Unit = _
fn visit_Impl_TopTypeDef(Self, TypeDecl) -> Unit = _
fn visit_Impl_TopFuncDef(Self, fun_decl~ : FunDecl, decl_body~ : DeclBody, where_clause~ : WhereClause?, loc~ : Location) -> Unit = _
fn visit_Impl_TopLetDef(Self, binder~ : Binder, ty~ : Type?, expr~ : Expr, vis~ : Visibility, is_constant~ : Bool, loc~ : Location, attrs~ : List[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[TypeVarBinder], method_quantifiers~ : List[TypeVarBinder], params~ : List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString) -> Unit = _
fn visit_Impl_TopView(Self, quantifiers~ : List[TypeVarBinder], source_ty~ : Type, view_type_name~ : String, view_type_loc~ : Location, view_constrs~ : List[ConstrDecl], view_func_name~ : Binder, parameters~ : List[Parameter], params_loc~ : Location, body~ : Expr, vis~ : Visibility, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString) -> Unit = _
fn visit_Impl_TopImplRelation(Self, self_ty~ : Type, trait_~ : TypeName, quantifiers~ : List[TypeVarBinder], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString, is_declare~ : Bool) -> Unit = _
fn visit_Impl_TopUsing(Self, pkg~ : Label, names~ : List[(AliasTarget, UsingKind)], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString) -> Unit = _
fn visit_Impl_TopExtend(Self, type_name~ : TypeName, trait_~ : TypeName, names~ : List[AliasTarget], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString) -> Unit = _
fn visit_Impl_TopImport(Self, kind~ : String?, packages~ : List[ImportPackage], loc~ : Location, doc~ : DocString) -> Unit = _
fn visit_UsingKind(Self, UsingKind) -> Unit = _
fn visit_ImportPackage(Self, ImportPackage) -> Unit = _
fn visit_Expr(Self, Expr) -> Unit = _
fn visit_Expr_Apply(Self, func~ : Expr, args~ : List[Argument], loc~ : Location) -> Unit = _
fn visit_Expr_Infix(Self, op~ : Var, lhs~ : Expr, rhs~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_Unary(Self, op~ : Var, expr~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_Array(Self, exprs~ : List[Expr], is_iter~ : Bool, loc~ : Location) -> Unit = _
fn visit_Expr_ArraySpread(Self, elems~ : List[SpreadableElem], is_iter~ : Bool, loc~ : Location) -> Unit = _
fn visit_Expr_ArrayGet(Self, array~ : Expr, index~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_ArrayGetSlice(Self, array~ : Expr, start_index~ : Expr?, end_index~ : Expr?, index_loc~ : Location, loc~ : Location) -> Unit = _
fn visit_Expr_ArraySet(Self, array~ : Expr, index~ : Expr, value~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_ArrayAugmentedSet(Self, op~ : Var, array~ : Expr, index~ : Expr, value~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_Constant(Self, c~ : Constant, loc~ : Location) -> Unit = _
fn visit_Expr_MultilineString(Self, elems~ : List[MultilineStringElem], loc~ : Location) -> Unit = _
fn visit_Expr_Interp(Self, elems~ : List[InterpElem], loc~ : Location) -> Unit = _
fn visit_Expr_BytesInterp(Self, elems~ : 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_LabelledBlock(Self, label~ : Label, body~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_While(Self, loop_cond~ : Expr, loop_body~ : Expr, while_else~ : Expr?, label~ : Label?, loc~ : Location) -> Unit = _
fn visit_Expr_Function(Self, func~ : Func, loc~ : Location) -> Unit = _
fn visit_Expr_Ident(Self, id~ : Var, loc~ : Location) -> Unit = _
fn visit_Expr_If(Self, cond~ : Expr, ifso~ : Expr, ifnot~ : Expr?, loc~ : Location) -> Unit = _
fn visit_Expr_Guard(Self, cond~ : Expr, otherwise~ : Expr?, body~ : Expr, exclamation~ : Bool, guard_loc~ : Location, loc~ : Location) -> Unit = _
fn visit_Expr_Is(Self, expr~ : Expr, pat~ : Pattern, loc~ : Location) -> Unit = _
fn visit_Expr_Defer(Self, expr~ : Expr, body~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_LetFn(Self, name~ : Binder, func~ : Func, body~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_LetAnd(Self, bindings~ : List[(Binder, Type?, Func)], body~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_Let(Self, pattern~ : Pattern, expr~ : Expr, body~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_Sequence(Self, exprs~ : List[Expr], last_expr~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_Tuple(Self, exprs~ : List[Expr], loc~ : Location) -> Unit = _
fn visit_Expr_Record(Self, type_name~ : TypeName?, fields~ : List[FieldDef], trailing~ : TrailingMark, loc~ : Location) -> Unit = _
fn visit_Expr_RecordUpdate(Self, type_name~ : TypeName?, record~ : Expr, fields~ : List[FieldDef], loc~ : Location) -> Unit = _
fn visit_Expr_Field(Self, record~ : Expr, accessor~ : Accessor, loc~ : Location) -> Unit = _
fn visit_Expr_Method(Self, type_name~ : TypeName, method_name~ : Label, loc~ : Location) -> Unit = _
fn visit_Expr_DotApply(Self, self~ : Expr, method_name~ : Label, args~ : List[Argument], return_self~ : Bool, loc~ : Location) -> Unit = _
fn visit_Expr_As(Self, expr~ : Expr, trait_~ : TypeName, loc~ : Location) -> Unit = _
fn visit_Expr_Mutate(Self, record~ : Expr, accessor~ : Accessor, field~ : Expr, augmented_by~ : Var?, loc~ : Location) -> Unit = _
fn visit_Expr_Match(Self, expr~ : Expr, cases~ : List[Case], match_loc~ : Location, loc~ : Location) -> Unit = _
fn visit_Expr_LexMatch(Self, strategy~ : Label?, expr~ : Expr, match_loc~ : Location, cases~ : List[LexCase], loc~ : Location) -> Unit = _
fn visit_Expr_LexScan(Self, strategy~ : Label?, expr~ : Expr, match_loc~ : Location, cases~ : 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, ty~ : Type?, expr~ : Expr, body~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_Pipe(Self, lhs~ : Expr, rhs~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_Assign(Self, var_~ : Var, expr~ : Expr, augmented_by~ : Var?, loc~ : Location) -> Unit = _
fn visit_Expr_Hole(Self, loc~ : Location, kind~ : Hole) -> Unit = _
fn visit_Expr_Return(Self, return_value~ : Expr?, loc~ : Location) -> Unit = _
fn visit_Expr_Raise(Self, err_value~ : Expr, loc~ : Location) -> Unit = _
fn visit_Expr_Unit(Self, loc~ : Location, faked~ : Bool) -> Unit = _
fn visit_Expr_Break(Self, arg~ : Expr?, label~ : Label?, loc~ : Location) -> Unit = _
fn visit_Expr_Continue(Self, args~ : List[Expr], label~ : Label?, loc~ : Location) -> Unit = _
fn visit_Expr_For(Self, binders~ : List[(Binder, Expr)], condition~ : Expr?, continue_block~ : List[(Binder, Expr)], body~ : Expr, for_else~ : Expr?, label~ : Label?, loc~ : Location, where_clause~ : WhereClause?) -> Unit = _
fn visit_Expr_ForEach(Self, binders~ : List[Binder?], expr~ : Expr, init~ : List[(Binder, Expr)], continue_block~ : List[(Binder, Expr)], body~ : Expr, else_block~ : Expr?, where_clause~ : WhereClause?, label~ : Label?, loc~ : Location) -> Unit = _
fn visit_Expr_Try(Self, body~ : Expr, catch_~ : List[Case], try_else~ : List[Case]?, has_try~ : Bool, try_loc~ : Location, catch_loc~ : Location, else_loc~ : Location, loc~ : Location) -> Unit = _
fn visit_Expr_TryOperator(Self, body~ : Expr, kind~ : TryOperatorKind, try_loc~ : Location, loc~ : Location) -> Unit = _
fn visit_Expr_Map(Self, elems~ : List[MapExprElem], loc~ : Location) -> Unit = _
fn visit_Expr_Group(Self, expr~ : Expr, group~ : Group, loc~ : Location) -> Unit = _
fn visit_Expr_StaticAssert(Self, asserts~ : List[StaticAssertion], body~ : Expr) -> Unit = _
}pub(open) trait MapVisitor {
fn base(Self) -> MapVisitorBase[Self] = _
fn visit_Visibility(Self, Visibility) -> Visibility = _
fn visit_Visibility_Pub(Self, attr~ : String?, loc~ : Location) -> Visibility = _
fn visit_Visibility_Priv(Self, loc~ : Location) -> Visibility = _
fn visit_Constant(Self, Constant) -> Constant = _
fn visit_Label(Self, Label) -> Label = _
fn visit_ConstrName(Self, ConstrName) -> ConstrName = _
fn visit_LongIdent(Self, LongIdent) -> LongIdent = _
fn visit_LongIdent_Ident(Self, name~ : String) -> LongIdent = _
fn visit_LongIdent_Dot(Self, pkg~ : String, id~ : String) -> LongIdent = _
fn visit_TypeName(Self, TypeName) -> TypeName = _
fn visit_ConstrId(Self, ConstrId) -> ConstrId = _
fn visit_Type(Self, Type) -> Type = _
fn visit_Type_Any(Self, loc~ : Location) -> Type = _
fn visit_Type_Arrow(Self, args~ : List[Type], res~ : Type, err~ : ErrorType, is_async~ : Location?, loc~ : Location) -> Type = _
fn visit_Type_Tuple(Self, tys~ : List[Type], loc~ : Location) -> Type = _
fn visit_Type_Name(Self, constr_id~ : ConstrId, tys~ : List[Type], loc~ : Location) -> Type = _
fn visit_Type_Option(Self, ty~ : Type, loc~ : Location, question_loc~ : Location) -> Type = _
fn visit_Type_Object(Self, ConstrId) -> Type = _
fn visit_ErrorType(Self, ErrorType) -> ErrorType = _
fn visit_ErrorType_ErrorType(Self, ty~ : Type) -> ErrorType = _
fn visit_ErrorType_DefaultErrorType(Self, loc~ : Location) -> ErrorType = _
fn visit_ErrorType_Noraise(Self, loc~ : Location) -> ErrorType = _
fn visit_ErrorType_MaybeError(Self, ty~ : Type) -> ErrorType = _
fn visit_ConstrParam(Self, ConstrParam) -> ConstrParam = _
fn visit_ConstrDecl(Self, ConstrDecl) -> ConstrDecl = _
fn visit_ExceptionDecl(Self, ExceptionDecl) -> ExceptionDecl = _
fn visit_ExceptionDecl_EnumPayload(Self, List[ConstrDecl]) -> ExceptionDecl = _
fn visit_FieldName(Self, FieldName) -> FieldName = _
fn visit_FieldDecl(Self, FieldDecl) -> FieldDecl = _
fn visit_TypeDesc(Self, TypeDesc) -> TypeDesc = _
fn visit_TypeDesc_Error(Self, ExceptionDecl) -> TypeDesc = _
fn visit_TypeDesc_Variant(Self, List[ConstrDecl]) -> TypeDesc = _
fn visit_TypeDesc_Record(Self, fields~ : List[FieldDecl]) -> TypeDesc = _
fn visit_TypeDesc_TupleStruct(Self, List[Type]) -> TypeDesc = _
fn visit_TypeDesc_Alias(Self, Type) -> TypeDesc = _
fn visit_Hole(Self, Hole) -> Hole = _
fn visit_ArgumentKind(Self, ArgumentKind) -> ArgumentKind = _
fn visit_ArgumentKind_Labelled(Self, Label) -> ArgumentKind = _
fn visit_ArgumentKind_LabelledPun(Self, Label) -> ArgumentKind = _
fn visit_ArgumentKind_LabelledOption(Self, label~ : Label, question_loc~ : Location) -> ArgumentKind = _
fn visit_ArgumentKind_LabelledOptionPun(Self, label~ : Label, question_loc~ : Location) -> ArgumentKind = _
fn visit_FnKind(Self, FnKind) -> FnKind = _
fn visit_Group(Self, Group) -> Group = _
fn visit_TrailingMark(Self, TrailingMark) -> TrailingMark = _
fn visit_TypeVarConstraint(Self, TypeVarConstraint) -> TypeVarConstraint = _
fn visit_TypeVarBinder(Self, TypeVarBinder) -> TypeVarBinder = _
fn visit_TypeDeclBinder(Self, TypeDeclBinder) -> TypeDeclBinder = _
fn visit_Binder(Self, Binder) -> Binder = _
fn visit_Var(Self, Var) -> Var = _
fn visit_ConstructorExtraInfo(Self, ConstructorExtraInfo) -> ConstructorExtraInfo = _
fn visit_ConstructorExtraInfo_TypeName(Self, TypeName) -> ConstructorExtraInfo = _
fn visit_ConstructorExtraInfo_Package(Self, String) -> ConstructorExtraInfo = _
fn visit_Constructor(Self, Constructor) -> Constructor = _
fn visit_Accessor(Self, Accessor) -> Accessor = _
fn visit_Accessor_Label(Self, Label) -> Accessor = _
fn visit_Accessor_Index(Self, tuple_index~ : Int, loc~ : Location) -> Accessor = _
fn visit_Accessor_Newtype(Self, loc~ : Location) -> Accessor = _
fn visit_AliasTarget(Self, AliasTarget) -> AliasTarget = _
fn visit_Argument(Self, Argument) -> Argument = _
fn visit_Parameter(Self, Parameter) -> Parameter = _
fn visit_Parameter_DiscardPositional(Self, ty~ : Type?, loc~ : Location) -> Parameter = _
fn visit_Parameter_Positional(Self, binder~ : Binder, ty~ : Type?) -> Parameter = _
fn visit_Parameter_Labelled(Self, binder~ : Binder, ty~ : Type?) -> Parameter = _
fn visit_Parameter_Optional(Self, binder~ : Binder, default~ : Expr, ty~ : Type?) -> Parameter = _
fn visit_Parameter_QuestionOptional(Self, binder~ : Binder, ty~ : Type?) -> Parameter = _
fn visit_Case(Self, Case) -> Case = _
fn visit_LexCase(Self, LexCase) -> LexCase = _
fn visit_LexTopPattern(Self, LexTopPattern) -> LexTopPattern = _
fn visit_LexTopPattern_Pattern(Self, LexPattern) -> LexTopPattern = _
fn visit_LexTopPattern_Binder(Self, Binder) -> LexTopPattern = _
fn visit_LexTopPattern_Wildcard(Self, loc~ : Location) -> LexTopPattern = _
fn visit_LexPattern(Self, LexPattern) -> LexPattern = _
fn visit_LexPattern_Regex(Self, lit~ : String, offset~ : Int, loc~ : Location) -> LexPattern = _
fn visit_LexPattern_RegexInterp(Self, elems~ : List[InterpElem], loc~ : Location) -> LexPattern = _
fn visit_LexPattern_ConstantRef(Self, lid~ : LongIdent, loc~ : Location) -> LexPattern = _
fn visit_LexPattern_Alias(Self, pat~ : LexPattern, binder~ : Binder, loc~ : Location) -> LexPattern = _
fn visit_LexPattern_Sequence(Self, pats~ : List[LexPattern], loc~ : Location) -> LexPattern = _
fn visit_SpreadableElem(Self, SpreadableElem) -> SpreadableElem = _
fn visit_SpreadableElem_Regular(Self, Expr) -> SpreadableElem = _
fn visit_SpreadableElem_Spread(Self, expr~ : Expr, loc~ : Location) -> SpreadableElem = _
fn visit_MapExprElem(Self, MapExprElem) -> MapExprElem = _
fn visit_StaticAssertion(Self, StaticAssertion) -> StaticAssertion = _
fn visit_Func(Self, Func) -> Func = _
fn visit_FieldDef(Self, FieldDef) -> FieldDef = _
fn visit_InterpElem(Self, InterpElem) -> InterpElem = _
fn visit_InterpElem_Literal(Self, repr~ : String, loc~ : Location) -> InterpElem = _
fn visit_InterpElem_Expr(Self, expr~ : Expr, loc~ : Location) -> InterpElem = _
fn visit_InterpElem_Source(Self, InterpSource) -> InterpElem = _
fn visit_MultilineStringElem(Self, MultilineStringElem) -> MultilineStringElem = _
fn visit_MultilineStringElem_String(Self, String) -> MultilineStringElem = _
fn visit_MultilineStringElem_Interp(Self, List[InterpElem]) -> MultilineStringElem = _
fn visit_TryOperatorKind(Self, TryOperatorKind) -> TryOperatorKind = _
fn visit_DotDotBinder(Self, DotDotBinder) -> DotDotBinder = _
fn visit_DotDotBinder_BinderAs(Self, Binder) -> DotDotBinder = _
fn visit_DotDotBinder_Binder(Self, Binder) -> DotDotBinder = _
fn visit_ArrayPattern(Self, ArrayPattern) -> ArrayPattern = _
fn visit_ArrayPattern_Pattern(Self, Pattern) -> ArrayPattern = _
fn visit_ArrayPattern_StringSpread(Self, str~ : String, loc~ : Location) -> ArrayPattern = _
fn visit_ArrayPattern_BytesSpread(Self, bytes~ : String, loc~ : Location) -> ArrayPattern = _
fn visit_ArrayPattern_ConstSpread(Self, binder~ : Binder, pkg~ : String?, loc~ : Location) -> ArrayPattern = _
fn visit_ArrayPatterns(Self, ArrayPatterns) -> ArrayPatterns = _
fn visit_ArrayPatterns_Closed(Self, List[ArrayPattern]) -> ArrayPatterns = _
fn visit_ArrayPatterns_Open(Self, List[ArrayPattern], List[ArrayPattern], DotDotBinder) -> ArrayPatterns = _
fn visit_WhereClause(Self, WhereClause) -> WhereClause = _
fn visit_FieldPat(Self, FieldPat) -> FieldPat = _
fn visit_ConstrPatArg(Self, ConstrPatArg) -> ConstrPatArg = _
fn visit_MapPatElem(Self, MapPatElem) -> MapPatElem = _
fn visit_RangeKind(Self, RangeKind) -> RangeKind = _
fn visit_Pattern(Self, Pattern) -> Pattern = _
fn visit_Pattern_Alias(Self, pat~ : Pattern, alias_~ : Binder, loc~ : Location) -> Pattern = _
fn visit_Pattern_Any(Self, loc~ : Location) -> Pattern = _
fn visit_Pattern_Array(Self, pats~ : ArrayPatterns, loc~ : Location) -> Pattern = _
fn visit_Pattern_Constant(Self, c~ : Constant, loc~ : Location) -> Pattern = _
fn visit_Pattern_Constraint(Self, pat~ : Pattern, ty~ : Type, loc~ : Location) -> Pattern = _
fn visit_Pattern_Constr(Self, constr~ : Constructor, args~ : List[ConstrPatArg]?, is_open~ : Bool, loc~ : Location) -> Pattern = _
fn visit_Pattern_Or(Self, pat1~ : Pattern, pat2~ : Pattern, loc~ : Location) -> Pattern = _
fn visit_Pattern_Tuple(Self, pats~ : List[Pattern], loc~ : Location) -> Pattern = _
fn visit_Pattern_Var(Self, Binder) -> Pattern = _
fn visit_Pattern_Record(Self, fields~ : List[FieldPat], is_closed~ : Bool, loc~ : Location) -> Pattern = _
fn visit_Pattern_Map(Self, elems~ : List[MapPatElem], is_closed~ : Bool, loc~ : Location) -> Pattern = _
fn visit_Pattern_Range(Self, lhs~ : Pattern, rhs~ : Pattern, kind~ : RangeKind, loc~ : Location) -> Pattern = _
fn visit_Pattern_With(Self, pat~ : Pattern, bindings~ : List[(Binder, Expr)], loc~ : Location) -> Pattern = _
fn visit_Pattern_SpecialConstr(Self, binder~ : Binder, args~ : List[ConstrPatArg], loc~ : Location) -> Pattern = _
fn visit_DerivingDirective(Self, DerivingDirective) -> DerivingDirective = _
fn visit_TypeDecl(Self, TypeDecl) -> TypeDecl = _
fn visit_FuncStubs(Self, FuncStubs) -> FuncStubs = _
fn visit_FuncStubs_Import(Self, module_name~ : String, func_name~ : String, language~ : String?) -> FuncStubs = _
fn visit_FuncStubs_Embedded(Self, language~ : String?, code~ : EmbeddedCode) -> FuncStubs = _
fn visit_EmbeddedCode(Self, EmbeddedCode) -> EmbeddedCode = _
fn visit_EmbeddedCode_CodeString(Self, String) -> EmbeddedCode = _
fn visit_EmbeddedCode_CodeMultilineString(Self, List[String]) -> EmbeddedCode = _
fn visit_DeclBody(Self, DeclBody) -> DeclBody = _
fn visit_DeclBody_DeclBody(Self, expr~ : Expr) -> DeclBody = _
fn visit_DeclBody_DeclStubs(Self, FuncStubs) -> DeclBody = _
fn visit_FunDecl(Self, FunDecl) -> FunDecl = _
fn visit_TraitMethodDecl(Self, TraitMethodDecl) -> TraitMethodDecl = _
fn visit_TraitDecl(Self, TraitDecl) -> TraitDecl = _
fn visit_UsingKind(Self, UsingKind) -> UsingKind = _
fn visit_ImportPackage(Self, ImportPackage) -> ImportPackage = _
fn visit_Impl(Self, Impl) -> Impl = _
fn visit_Impl_TopExpr(Self, expr~ : Expr, is_main~ : Bool, is_async~ : Location?, loc~ : Location) -> Impl = _
fn visit_Impl_TopTest(Self, expr~ : Expr, name~ : (String, Location)?, params~ : List[Parameter]?, is_async~ : Location?, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString) -> Impl = _
fn visit_Impl_TopTypeDef(Self, TypeDecl) -> Impl = _
fn visit_Impl_TopFuncDef(Self, fun_decl~ : FunDecl, decl_body~ : DeclBody, where_clause~ : WhereClause?, loc~ : Location) -> Impl = _
fn visit_Impl_TopLetDef(Self, binder~ : Binder, ty~ : Type?, expr~ : Expr, vis~ : Visibility, is_constant~ : Bool, loc~ : Location, attrs~ : List[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[TypeVarBinder], method_quantifiers~ : List[TypeVarBinder], params~ : List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString) -> Impl = _
fn visit_Impl_TopView(Self, quantifiers~ : List[TypeVarBinder], source_ty~ : Type, view_type_name~ : String, view_type_loc~ : Location, view_constrs~ : List[ConstrDecl], view_func_name~ : Binder, parameters~ : List[Parameter], params_loc~ : Location, body~ : Expr, vis~ : Visibility, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString) -> Impl = _
fn visit_Impl_TopImplRelation(Self, self_ty~ : Type, trait_~ : TypeName, quantifiers~ : List[TypeVarBinder], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString, is_declare~ : Bool) -> Impl = _
fn visit_Impl_TopUsing(Self, pkg~ : Label, names~ : List[(AliasTarget, UsingKind)], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString) -> Impl = _
fn visit_Impl_TopExtend(Self, type_name~ : TypeName, trait_~ : TypeName, names~ : List[AliasTarget], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString) -> Impl = _
fn visit_Impl_TopImport(Self, kind~ : String?, packages~ : List[ImportPackage], loc~ : Location, doc~ : DocString) -> Impl = _
fn visit_Expr(Self, Expr) -> Expr = _
fn visit_Expr_Apply(Self, func~ : Expr, args~ : List[Argument], loc~ : Location) -> Expr = _
fn visit_Expr_Infix(Self, op~ : Var, lhs~ : Expr, rhs~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_Unary(Self, op~ : Var, expr~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_Array(Self, exprs~ : List[Expr], is_iter~ : Bool, loc~ : Location) -> Expr = _
fn visit_Expr_ArraySpread(Self, elems~ : List[SpreadableElem], is_iter~ : Bool, loc~ : Location) -> Expr = _
fn visit_Expr_ArrayGet(Self, array~ : Expr, index~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_ArrayGetSlice(Self, array~ : Expr, start_index~ : Expr?, end_index~ : Expr?, index_loc~ : Location, loc~ : Location) -> Expr = _
fn visit_Expr_ArraySet(Self, array~ : Expr, index~ : Expr, value~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_ArrayAugmentedSet(Self, op~ : Var, array~ : Expr, index~ : Expr, value~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_Constant(Self, c~ : Constant, loc~ : Location) -> Expr = _
fn visit_Expr_MultilineString(Self, elems~ : List[MultilineStringElem], loc~ : Location) -> Expr = _
fn visit_Expr_Interp(Self, elems~ : List[InterpElem], loc~ : Location) -> Expr = _
fn visit_Expr_BytesInterp(Self, elems~ : 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_LabelledBlock(Self, label~ : Label, body~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_While(Self, loop_cond~ : Expr, loop_body~ : Expr, while_else~ : Expr?, label~ : Label?, loc~ : Location) -> Expr = _
fn visit_Expr_Function(Self, func~ : Func, loc~ : Location) -> Expr = _
fn visit_Expr_Ident(Self, id~ : Var, loc~ : Location) -> Expr = _
fn visit_Expr_If(Self, cond~ : Expr, ifso~ : Expr, ifnot~ : Expr?, loc~ : Location) -> Expr = _
fn visit_Expr_Guard(Self, cond~ : Expr, otherwise~ : Expr?, body~ : Expr, exclamation~ : Bool, guard_loc~ : Location, loc~ : Location) -> Expr = _
fn visit_Expr_Is(Self, expr~ : Expr, pat~ : Pattern, loc~ : Location) -> Expr = _
fn visit_Expr_Defer(Self, expr~ : Expr, body~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_LetFn(Self, name~ : Binder, func~ : Func, body~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_LetAnd(Self, bindings~ : List[(Binder, Type?, Func)], body~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_Let(Self, pattern~ : Pattern, expr~ : Expr, body~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_Sequence(Self, exprs~ : List[Expr], last_expr~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_Tuple(Self, exprs~ : List[Expr], loc~ : Location) -> Expr = _
fn visit_Expr_Record(Self, type_name~ : TypeName?, fields~ : List[FieldDef], trailing~ : TrailingMark, loc~ : Location) -> Expr = _
fn visit_Expr_RecordUpdate(Self, type_name~ : TypeName?, record~ : Expr, fields~ : List[FieldDef], loc~ : Location) -> Expr = _
fn visit_Expr_Field(Self, record~ : Expr, accessor~ : Accessor, loc~ : Location) -> Expr = _
fn visit_Expr_Method(Self, type_name~ : TypeName, method_name~ : Label, loc~ : Location) -> Expr = _
fn visit_Expr_DotApply(Self, self~ : Expr, method_name~ : Label, args~ : List[Argument], return_self~ : Bool, loc~ : Location) -> Expr = _
fn visit_Expr_As(Self, expr~ : Expr, trait_~ : TypeName, loc~ : Location) -> Expr = _
fn visit_Expr_Mutate(Self, record~ : Expr, accessor~ : Accessor, field~ : Expr, augmented_by~ : Var?, loc~ : Location) -> Expr = _
fn visit_Expr_Match(Self, expr~ : Expr, cases~ : List[Case], match_loc~ : Location, loc~ : Location) -> Expr = _
fn visit_Expr_LexMatch(Self, strategy~ : Label?, expr~ : Expr, match_loc~ : Location, cases~ : List[LexCase], loc~ : Location) -> Expr = _
fn visit_Expr_LexScan(Self, strategy~ : Label?, expr~ : Expr, match_loc~ : Location, cases~ : 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, ty~ : Type?, expr~ : Expr, body~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_Pipe(Self, lhs~ : Expr, rhs~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_Assign(Self, var_~ : Var, expr~ : Expr, augmented_by~ : Var?, loc~ : Location) -> Expr = _
fn visit_Expr_Hole(Self, loc~ : Location, kind~ : Hole) -> Expr = _
fn visit_Expr_Return(Self, return_value~ : Expr?, loc~ : Location) -> Expr = _
fn visit_Expr_Raise(Self, err_value~ : Expr, loc~ : Location) -> Expr = _
fn visit_Expr_Unit(Self, loc~ : Location, faked~ : Bool) -> Expr = _
fn visit_Expr_Break(Self, arg~ : Expr?, label~ : Label?, loc~ : Location) -> Expr = _
fn visit_Expr_Continue(Self, args~ : List[Expr], label~ : Label?, loc~ : Location) -> Expr = _
fn visit_Expr_For(Self, binders~ : List[(Binder, Expr)], condition~ : Expr?, continue_block~ : List[(Binder, Expr)], body~ : Expr, for_else~ : Expr?, label~ : Label?, loc~ : Location, where_clause~ : WhereClause?) -> Expr = _
fn visit_Expr_ForEach(Self, binders~ : List[Binder?], expr~ : Expr, init~ : List[(Binder, Expr)], continue_block~ : List[(Binder, Expr)], body~ : Expr, else_block~ : Expr?, where_clause~ : WhereClause?, label~ : Label?, loc~ : Location) -> Expr = _
fn visit_Expr_Try(Self, body~ : Expr, catch_~ : List[Case], try_else~ : List[Case]?, has_try~ : Bool, try_loc~ : Location, catch_loc~ : Location, else_loc~ : Location, loc~ : Location) -> Expr = _
fn visit_Expr_TryOperator(Self, body~ : Expr, kind~ : TryOperatorKind, try_loc~ : Location, loc~ : Location) -> Expr = _
fn visit_Expr_Map(Self, elems~ : List[MapExprElem], loc~ : Location) -> Expr = _
fn visit_Expr_Group(Self, expr~ : Expr, group~ : Group, loc~ : Location) -> Expr = _
fn visit_Expr_StaticAssert(Self, asserts~ : List[StaticAssertion], body~ : Expr) -> Expr = _
}pub(all) enum ArrayPatterns {
Closed(List[ArrayPattern])
Open(List[ArrayPattern], List[ArrayPattern], DotDotBinder)
} derive(Debug)pub(all) enum Constant {
Bool(Bool)
Byte(String)
Bytes(String)
Char(String)
Int(String)
Int64(String)
UInt(String)
UInt64(String)
Float(String)
Double(String)
String(String)
Regex(String)
BigInt(String)
} derive(Debug)pub(all) struct ConstrDecl {
name : ConstrName
args : List[ConstrParam]?
tag : (String, Location)?
loc : Location
attrs : List[Attribute]
doc : DocString
} derive(Debug)pub(all) struct Constructor {
name : ConstrName
extra_info : ConstructorExtraInfo
loc : Location
} derive(Debug)pub(all) enum Expr {
Apply(func~ : Expr, args~ : List[Argument], loc~ : Location)
Infix(op~ : Var, lhs~ : Expr, rhs~ : Expr, loc~ : Location)
Unary(op~ : Var, expr~ : Expr, loc~ : Location)
Array(exprs~ : List[Expr], is_iter~ : Bool, loc~ : Location)
ArraySpread(elems~ : List[SpreadableElem], is_iter~ : Bool, loc~ : Location)
ListComprehension(kind~ : ListComprehensionKind, guard_~ : Expr?, body~ : Expr, is_iter~ : Bool, loc~ : Location)
ArrayGet(array~ : Expr, index~ : Expr, loc~ : Location)
ArrayGetSlice(array~ : Expr, start_index~ : Expr?, end_index~ : Expr?, index_loc~ : Location, loc~ : Location)
ArraySet(array~ : Expr, index~ : Expr, value~ : Expr, loc~ : Location)
ArrayAugmentedSet(op~ : Var, array~ : Expr, index~ : Expr, value~ : Expr, loc~ : Location)
Constant(c~ : Constant, loc~ : Location)
MultilineString(elems~ : List[MultilineStringElem], loc~ : Location)
Interp(elems~ : List[InterpElem], loc~ : Location)
BytesInterp(elems~ : List[InterpElem], loc~ : Location)
Constraint(expr~ : Expr, ty~ : Type, loc~ : Location)
Constr(constr~ : Constructor, loc~ : Location)
LabelledBlock(label~ : Label, body~ : Expr, loc~ : Location)
While(loop_cond~ : Expr, loop_body~ : Expr, while_else~ : Expr?, label~ : Label?, loc~ : Location)
Function(func~ : Func, loc~ : Location)
Ident(id~ : Var, loc~ : Location)
If(cond~ : Expr, ifso~ : Expr, ifnot~ : Expr?, loc~ : Location)
Guard(cond~ : Expr, otherwise~ : Expr?, body~ : Expr, exclamation~ : Bool, guard_loc~ : Location, loc~ : Location)
Is(expr~ : Expr, pat~ : Pattern, loc~ : Location)
RegexMatch(expr~ : Expr, pat~ : RegexPattern, bindings~ : List[(Label, Binder?)], loc~ : Location)
Defer(expr~ : Expr, body~ : Expr, loc~ : Location)
LetFn(name~ : Binder, func~ : Func, body~ : Expr, loc~ : Location)
LetAnd(bindings~ : List[(Binder, Type?, Func)], body~ : Expr, loc~ : Location)
Let(pattern~ : Pattern, expr~ : Expr, body~ : Expr, loc~ : Location)
Sequence(exprs~ : List[Expr], last_expr~ : Expr, loc~ : Location)
Tuple(exprs~ : List[Expr], loc~ : Location)
Record(type_name~ : TypeName?, fields~ : List[FieldDef], trailing~ : TrailingMark, loc~ : Location)
RecordUpdate(type_name~ : TypeName?, record~ : Expr, fields~ : List[FieldDef], loc~ : Location)
Field(record~ : Expr, accessor~ : Accessor, loc~ : Location)
Method(type_name~ : TypeName, method_name~ : Label, loc~ : Location)
DotApply(self~ : Expr, method_name~ : Label, args~ : List[Argument], return_self~ : Bool, loc~ : Location)
As(expr~ : Expr, trait_~ : TypeName, loc~ : Location)
Mutate(record~ : Expr, accessor~ : Accessor, field~ : Expr, augmented_by~ : Var?, loc~ : Location)
Match(expr~ : Expr, cases~ : List[Case], match_loc~ : Location, loc~ : Location)
LexMatch(strategy~ : Label?, expr~ : Expr, match_loc~ : Location, cases~ : List[LexCase], loc~ : Location)
LexScan(strategy~ : Label?, expr~ : Expr, match_loc~ : Location, cases~ : List[LexScanCase], loc~ : Location)
LetMut(binder~ : Binder, ty~ : Type?, expr~ : Expr, body~ : Expr, loc~ : Location)
Pipe(lhs~ : Expr, rhs~ : Expr, loc~ : Location)
RevPipe(lhs~ : Expr, rhs~ : Expr, loc~ : Location)
Assign(var_~ : Var, expr~ : Expr, augmented_by~ : Var?, loc~ : Location)
Hole(loc~ : Location, kind~ : Hole)
Return(return_value~ : Expr?, loc~ : Location)
Raise(err_value~ : Expr, loc~ : Location)
Quantifier(kind~ : PredicateQuantifierKind, binder~ : Binder, binder_ty~ : Type, body~ : Expr, loc~ : Location)
Implies(lhs~ : Expr, rhs~ : Expr, loc~ : Location)
ProofAssert(expr~ : Expr, loc~ : Location)
ProofLet(binder~ : Binder, expr~ : Expr, loc~ : Location)
Unit(loc~ : Location, faked~ : Bool)
Break(arg~ : Expr?, label~ : Label?, loc~ : Location)
Continue(args~ : List[Expr], label~ : Label?, loc~ : Location)
For(binders~ : List[(Binder, Expr)], condition~ : Expr?, continue_block~ : List[(Binder, Expr)], body~ : Expr, for_else~ : Expr?, where_clause~ : WhereClause?, label~ : Label?, loc~ : Location)
ForEach(binders~ : List[Binder?], expr~ : Expr, init~ : List[(Binder, Expr)], continue_block~ : List[(Binder, Expr)], body~ : Expr, else_block~ : Expr?, where_clause~ : WhereClause?, label~ : Label?, loc~ : Location)
Try(body~ : Expr, catch_~ : List[Case], try_else~ : List[Case]?, has_try~ : Bool, try_loc~ : Location, catch_loc~ : Location, else_loc~ : Location, loc~ : Location)
TryOperator(body~ : Expr, kind~ : TryOperatorKind, try_loc~ : Location, loc~ : Location)
Map(elems~ : List[MapExprElem], loc~ : Location)
Group(expr~ : Expr, group~ : Group, loc~ : Location)
TemplateWriting(expr~ : Expr, template~ : Expr, is_conditional~ : Bool, loc~ : Location)
StaticAssert(asserts~ : List[StaticAssertion], body~ : Expr)
} derive(Debug)pub(all) enum FuncStubs {
Import(module_name~ : String, func_name~ : String, language~ : String?)
Embedded(language~ : String?, code~ : EmbeddedCode)
} derive(Debug)pub(all) enum Impl {
TopExpr(expr~ : Expr, is_main~ : Bool, is_async~ : Location?, loc~ : Location)
TopTest(expr~ : Expr, name~ : (String, Location)?, params~ : List[Parameter]?, is_async~ : Location?, loc~ : Location, attrs~ : List[Attribute], mut doc~ : DocString)
TopTypeDef(TypeDecl)
TopFuncDef(fun_decl~ : FunDecl, decl_body~ : DeclBody, where_clause~ : WhereClause?, loc~ : Location)
TopLetDef(binder~ : Binder, ty~ : Type?, expr~ : Expr, vis~ : Visibility, is_constant~ : Bool, loc~ : Location, attrs~ : List[Attribute], mut doc~ : DocString, is_declare~ : Bool)
TopTrait(TraitDecl)
TopImpl(self_ty~ : Type?, trait_~ : TypeName, method_name~ : Binder, quantifiers~ : List[TypeVarBinder], method_quantifiers~ : List[TypeVarBinder], params~ : List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : Location, attrs~ : List[Attribute], mut doc~ : DocString)
TopView(quantifiers~ : List[TypeVarBinder], source_ty~ : Type, view_type_name~ : String, view_type_loc~ : Location, view_constrs~ : List[ConstrDecl], view_func_name~ : Binder, parameters~ : List[Parameter], params_loc~ : Location, body~ : Expr, vis~ : Visibility, loc~ : Location, attrs~ : List[Attribute], mut doc~ : DocString)
TopImplRelation(self_ty~ : Type, trait_~ : TypeName, quantifiers~ : List[TypeVarBinder], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, mut doc~ : DocString, is_declare~ : Bool)
TopUsing(pkg~ : Label, names~ : List[(AliasTarget, UsingKind)], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, mut doc~ : DocString)
TopExtend(type_name~ : TypeName, trait_~ : TypeName, names~ : List[AliasTarget], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, mut doc~ : DocString)
TopImport(kind~ : String?, packages~ : List[ImportPackage], loc~ : Location, mut doc~ : DocString)
} derive(Debug)pub(all) enum InterpElem {
Literal(repr~ : String, loc~ : Location)
Expr(expr~ : Expr, loc~ : Location)
Source(InterpSource)
} derive(Debug)pub struct IterVisitorBase[T](T)impl IterVisitor for IterVisitorBase[T]fn[T : IterVisitor] visit_Accessor_Index(_ : IterVisitorBase[T], tuple_index~ : Int, loc~ : Location) -> Unitfn[T : IterVisitor] visit_ArgumentKind(env : IterVisitorBase[T], argument_kind : ArgumentKind) -> Unitfn[T : IterVisitor] visit_ArgumentKind_LabelledOption(_ : IterVisitorBase[T], label~ : Label, question_loc~ : Location) -> Unitfn[T : IterVisitor] visit_ArgumentKind_LabelledOptionPun(_ : IterVisitorBase[T], label~ : Label, question_loc~ : Location) -> Unitfn[T : IterVisitor] visit_ArrayPattern(env : IterVisitorBase[T], array_pattern : ArrayPattern) -> Unitfn[T : IterVisitor] visit_ArrayPattern_BytesSpread(_ : IterVisitorBase[T], bytes~ : String, loc~ : Location) -> Unitfn[T : IterVisitor] visit_ArrayPattern_ConstSpread(env : IterVisitorBase[T], binder~ : Binder, pkg~ : String?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_ArrayPattern_StringSpread(_ : IterVisitorBase[T], str~ : String, loc~ : Location) -> Unitfn[T : IterVisitor] visit_ArrayPatterns(env : IterVisitorBase[T], array_patterns : ArrayPatterns) -> Unitfn[T : IterVisitor] visit_ArrayPatterns_Closed(env : IterVisitorBase[T], array_patterns : List[ArrayPattern]) -> Unitfn[T : IterVisitor] visit_ArrayPatterns_Open(env : IterVisitorBase[T], prefix_patterns : List[ArrayPattern], suffix_patterns : List[ArrayPattern], dot_dot_binder : DotDotBinder) -> Unitfn[T : IterVisitor] visit_ConstrPatArg(env : IterVisitorBase[T], constr_pat_arg : ConstrPatArg) -> Unitfn[T : IterVisitor] visit_ConstructorExtraInfo(env : IterVisitorBase[T], constructor_extra_info : ConstructorExtraInfo) -> Unitfn[T : IterVisitor] visit_ConstructorExtraInfo_TypeName(env : IterVisitorBase[T], type_name : TypeName) -> Unitfn[T : IterVisitor] visit_DeclBody_DeclStubs(env : IterVisitorBase[T], func_stubs : FuncStubs) -> Unitfn[T : IterVisitor] visit_DerivingDirective(env : IterVisitorBase[T], deriving_directive : DerivingDirective) -> Unitfn[T : IterVisitor] visit_DotDotBinder(env : IterVisitorBase[T], dot_dot_binder : DotDotBinder) -> Unitfn[T : IterVisitor] visit_EmbeddedCode(env : IterVisitorBase[T], embedded_code : EmbeddedCode) -> Unitfn[T : IterVisitor] visit_EmbeddedCode_CodeMultilineString(_ : IterVisitorBase[T], _ : List[String]) -> Unitfn[T : IterVisitor] visit_ErrorType_DefaultErrorType(_ : IterVisitorBase[T], loc~ : Location) -> Unitfn[T : IterVisitor] visit_ExceptionDecl(env : IterVisitorBase[T], exception_decl : ExceptionDecl) -> Unitfn[T : IterVisitor] visit_ExceptionDecl_EnumPayload(env : IterVisitorBase[T], constr_decls : List[ConstrDecl]) -> Unitfn[T : IterVisitor] visit_Expr_Apply(env : IterVisitorBase[T], func~ : Expr, args~ : List[Argument], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Array(env : IterVisitorBase[T], exprs~ : List[Expr], is_iter~ : Bool, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_ArrayAugmentedSet(env : IterVisitorBase[T], op~ : Var, array~ : Expr, index~ : Expr, value~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_ArrayGet(env : IterVisitorBase[T], array~ : Expr, index~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_ArrayGetSlice(env : IterVisitorBase[T], array~ : Expr, start_index~ : Expr?, end_index~ : Expr?, index_loc~ : Location, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_ArraySet(env : IterVisitorBase[T], array~ : Expr, index~ : Expr, value~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_ArraySpread(env : IterVisitorBase[T], elems~ : List[SpreadableElem], is_iter~ : Bool, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_As(env : IterVisitorBase[T], expr~ : Expr, trait_~ : TypeName, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Assign(env : IterVisitorBase[T], var_~ : Var, expr~ : Expr, augmented_by~ : Var?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Break(env : IterVisitorBase[T], arg~ : Expr?, label~ : Label?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_BytesInterp(env : IterVisitorBase[T], elems~ : List[InterpElem], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Constant(env : IterVisitorBase[T], c~ : Constant, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Constr(env : IterVisitorBase[T], constr~ : Constructor, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Constraint(env : IterVisitorBase[T], expr~ : Expr, ty~ : Type, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Continue(env : IterVisitorBase[T], args~ : List[Expr], label~ : Label?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Defer(env : IterVisitorBase[T], expr~ : Expr, body~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_DotApply(env : IterVisitorBase[T], self~ : Expr, method_name~ : Label, args~ : List[Argument], return_self~ : Bool, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Field(env : IterVisitorBase[T], record~ : Expr, accessor~ : Accessor, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_For(env : IterVisitorBase[T], binders~ : List[(Binder, Expr)], condition~ : Expr?, continue_block~ : List[(Binder, Expr)], body~ : Expr, for_else~ : Expr?, label~ : Label?, loc~ : Location, where_clause~ : WhereClause?) -> Unitfn[T : IterVisitor] visit_Expr_Function(env : IterVisitorBase[T], func~ : Func, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Group(env : IterVisitorBase[T], expr~ : Expr, group~ : Group, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Guard(env : IterVisitorBase[T], cond~ : Expr, otherwise~ : Expr?, body~ : Expr, exclamation~ : Bool, guard_loc~ : Location, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Hole(env : IterVisitorBase[T], loc~ : Location, kind~ : Hole) -> Unitfn[T : IterVisitor] visit_Expr_If(env : IterVisitorBase[T], cond~ : Expr, ifso~ : Expr, ifnot~ : Expr?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Infix(env : IterVisitorBase[T], op~ : Var, lhs~ : Expr, rhs~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Interp(env : IterVisitorBase[T], elems~ : List[InterpElem], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Is(env : IterVisitorBase[T], expr~ : Expr, pat~ : Pattern, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_LabelledBlock(env : IterVisitorBase[T], label~ : Label, body~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Let(env : IterVisitorBase[T], pattern~ : Pattern, expr~ : Expr, body~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_LetAnd(env : IterVisitorBase[T], bindings~ : List[(Binder, Type?, Func)], body~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_LetFn(env : IterVisitorBase[T], name~ : Binder, func~ : Func, body~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_LetMut(env : IterVisitorBase[T], binder~ : Binder, ty~ : Type?, expr~ : Expr, body~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_LexMatch(env : IterVisitorBase[T], strategy~ : Label?, expr~ : Expr, match_loc~ : Location, cases~ : List[LexCase], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_LexScan(env : IterVisitorBase[T], strategy~ : Label?, expr~ : Expr, match_loc~ : Location, cases~ : List[LexScanCase], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Map(env : IterVisitorBase[T], elems~ : List[MapExprElem], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Match(env : IterVisitorBase[T], expr~ : Expr, cases~ : List[Case], match_loc~ : Location, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Method(env : IterVisitorBase[T], type_name~ : TypeName, method_name~ : Label, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_MultilineString(env : IterVisitorBase[T], elems~ : List[MultilineStringElem], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Mutate(env : IterVisitorBase[T], record~ : Expr, accessor~ : Accessor, field~ : Expr, augmented_by~ : Var?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Pipe(env : IterVisitorBase[T], lhs~ : Expr, rhs~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Raise(env : IterVisitorBase[T], err_value~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Record(env : IterVisitorBase[T], type_name~ : TypeName?, fields~ : List[FieldDef], trailing~ : TrailingMark, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_RecordUpdate(env : IterVisitorBase[T], type_name~ : TypeName?, record~ : Expr, fields~ : List[FieldDef], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Return(env : IterVisitorBase[T], return_value~ : Expr?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Sequence(env : IterVisitorBase[T], exprs~ : List[Expr], last_expr~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_StaticAssert(env : IterVisitorBase[T], asserts~ : List[StaticAssertion], body~ : Expr) -> Unitfn[T : IterVisitor] visit_Expr_TryOperator(env : IterVisitorBase[T], body~ : Expr, kind~ : TryOperatorKind, try_loc~ : Location, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Tuple(env : IterVisitorBase[T], exprs~ : List[Expr], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_Unary(env : IterVisitorBase[T], op~ : Var, expr~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Expr_While(env : IterVisitorBase[T], loop_cond~ : Expr, loop_body~ : Expr, while_else~ : Expr?, label~ : Label?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_FuncStubs_Embedded(env : IterVisitorBase[T], language~ : String?, code~ : EmbeddedCode) -> Unitfn[T : IterVisitor] visit_FuncStubs_Import(_ : IterVisitorBase[T], module_name~ : String, func_name~ : String, language~ : String?) -> Unitfn[T : IterVisitor] visit_Impl_TopExpr(env : IterVisitorBase[T], expr~ : Expr, is_main~ : Bool, is_async~ : Location?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Impl_TopExtend(env : IterVisitorBase[T], type_name~ : TypeName, trait_~ : TypeName, names~ : List[AliasTarget], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString) -> Unitfn[T : IterVisitor] visit_Impl_TopFuncDef(env : IterVisitorBase[T], fun_decl~ : FunDecl, decl_body~ : DeclBody, where_clause~ : WhereClause?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Impl_TopImpl(env : IterVisitorBase[T], self_ty~ : Type?, trait_~ : TypeName, method_name~ : Binder, quantifiers~ : List[TypeVarBinder], method_quantifiers~ : List[TypeVarBinder], params~ : List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString) -> Unitfn[T : IterVisitor] visit_Impl_TopImplRelation(env : IterVisitorBase[T], self_ty~ : Type, trait_~ : TypeName, quantifiers~ : List[TypeVarBinder], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString, is_declare~ : Bool) -> Unitfn[T : IterVisitor] visit_Impl_TopImport(env : IterVisitorBase[T], kind~ : String?, packages~ : List[ImportPackage], loc~ : Location, doc~ : DocString) -> Unitfn[T : IterVisitor] visit_Impl_TopLetDef(env : IterVisitorBase[T], binder~ : Binder, ty~ : Type?, expr~ : Expr, vis~ : Visibility, is_constant~ : Bool, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString, is_declare~ : Bool) -> Unitfn[T : IterVisitor] visit_Impl_TopUsing(env : IterVisitorBase[T], pkg~ : Label, names~ : List[(AliasTarget, UsingKind)], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString) -> Unitfn[T : IterVisitor] visit_Impl_TopView(env : IterVisitorBase[T], quantifiers~ : List[TypeVarBinder], source_ty~ : Type, view_type_name~ : String, view_type_loc~ : Location, view_constrs~ : List[ConstrDecl], view_func_name~ : Binder, parameters~ : List[Parameter], params_loc~ : Location, body~ : Expr, vis~ : Visibility, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString) -> Unitfn[T : IterVisitor] visit_ImportPackage(_ : IterVisitorBase[T], import_package : ImportPackage) -> Unitfn[T : IterVisitor] visit_InterpElem_Expr(env : IterVisitorBase[T], expr~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_InterpElem_Literal(_ : IterVisitorBase[T], repr~ : String, loc~ : Location) -> Unitfn[T : IterVisitor] visit_InterpElem_Source(_ : IterVisitorBase[T], interp_source : InterpSource) -> Unitfn[T : IterVisitor] visit_LexPattern_Alias(env : IterVisitorBase[T], pat~ : LexPattern, binder~ : Binder, loc~ : Location) -> Unitfn[T : IterVisitor] visit_LexPattern_ConstantRef(env : IterVisitorBase[T], lid~ : LongIdent, loc~ : Location) -> Unitfn[T : IterVisitor] visit_LexPattern_Regex(env : IterVisitorBase[T], lit~ : String, offset~ : Int, loc~ : Location) -> Unitfn[T : IterVisitor] visit_LexPattern_RegexInterp(env : IterVisitorBase[T], elems~ : List[InterpElem], loc~ : Location) -> Unitfn[T : IterVisitor] visit_LexPattern_Sequence(env : IterVisitorBase[T], pats~ : List[LexPattern], loc~ : Location) -> Unitfn[T : IterVisitor] visit_LexScanCase(env : IterVisitorBase[T], lex_scan_case : LexScanCase) -> Unitfn[T : IterVisitor] visit_LexScanCasePattern(env : IterVisitorBase[T], lex_scan_case_pattern : LexScanCasePattern) -> Unitfn[T : IterVisitor] visit_LexScanCasePattern_Binder(env : IterVisitorBase[T], binder : Binder) -> Unitfn[T : IterVisitor] visit_LexScanCasePattern_Pattern(env : IterVisitorBase[T], regex_pattern : RegexPattern) -> Unitfn[T : IterVisitor] visit_LexScanCasePattern_Wildcard(env : IterVisitorBase[T], loc~ : Location) -> Unitfn[T : IterVisitor] visit_LexTopPattern(env : IterVisitorBase[T], lex_top_pattern : LexTopPattern) -> Unitfn[T : IterVisitor] visit_LexTopPattern_Pattern(env : IterVisitorBase[T], lex_pattern : LexPattern) -> Unitfn[T : IterVisitor] visit_LongIdent_Dot(_ : IterVisitorBase[T], pkg~ : String, id~ : String) -> Unitfn[T : IterVisitor] visit_MapExprElem(env : IterVisitorBase[T], map_expr_elem : MapExprElem) -> Unitfn[T : IterVisitor] visit_MultilineStringElem(env : IterVisitorBase[T], multiline_string_elem : MultilineStringElem) -> Unitfn[T : IterVisitor] visit_MultilineStringElem_Interp(_ : IterVisitorBase[T], interp_elems : List[InterpElem]) -> Unitfn[T : IterVisitor] visit_MultilineStringElem_String(_ : IterVisitorBase[T], string_val : String) -> Unitfn[T : IterVisitor] visit_Parameter_DiscardPositional(env : IterVisitorBase[T], ty~ : Type?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Parameter_Labelled(env : IterVisitorBase[T], binder~ : Binder, ty~ : Type?) -> Unitfn[T : IterVisitor] visit_Parameter_Optional(env : IterVisitorBase[T], binder~ : Binder, default~ : Expr, ty~ : Type?) -> Unitfn[T : IterVisitor] visit_Parameter_Positional(env : IterVisitorBase[T], binder~ : Binder, ty~ : Type?) -> Unitfn[T : IterVisitor] visit_Parameter_QuestionOptional(env : IterVisitorBase[T], binder~ : Binder, ty~ : Type?) -> Unitfn[T : IterVisitor] visit_Pattern_Alias(env : IterVisitorBase[T], pat~ : Pattern, alias_~ : Binder, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_Array(env : IterVisitorBase[T], pats~ : ArrayPatterns, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_Constant(env : IterVisitorBase[T], c~ : Constant, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_Constr(env : IterVisitorBase[T], constr~ : Constructor, args~ : List[ConstrPatArg]?, is_open~ : Bool, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_Constraint(env : IterVisitorBase[T], pat~ : Pattern, ty~ : Type, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_Map(env : IterVisitorBase[T], elems~ : List[MapPatElem], is_closed~ : Bool, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_Or(env : IterVisitorBase[T], pat1~ : Pattern, pat2~ : Pattern, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_Range(env : IterVisitorBase[T], lhs~ : Pattern, rhs~ : Pattern, kind~ : RangeKind, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_Record(env : IterVisitorBase[T], fields~ : List[FieldPat], is_closed~ : Bool, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_SpecialConstr(env : IterVisitorBase[T], binder~ : Binder, args~ : List[ConstrPatArg], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_Tuple(env : IterVisitorBase[T], pats~ : List[Pattern], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Pattern_With(env : IterVisitorBase[T], pat~ : Pattern, bindings~ : List[(Binder, Expr)], loc~ : Location) -> Unitfn[T : IterVisitor] visit_SpreadableElem(env : IterVisitorBase[T], spreadable_elem : SpreadableElem) -> Unitfn[T : IterVisitor] visit_SpreadableElem_Spread(env : IterVisitorBase[T], expr~ : Expr, loc~ : Location) -> Unitfn[T : IterVisitor] visit_StaticAssertion(env : IterVisitorBase[T], static_assertion : StaticAssertion) -> Unitfn[T : IterVisitor] visit_TraitMethodDecl(env : IterVisitorBase[T], trait_method_decl : TraitMethodDecl) -> Unitfn[T : IterVisitor] visit_TryOperatorKind(_ : IterVisitorBase[T], try_operator_kind : TryOperatorKind) -> Unitfn[T : IterVisitor] visit_TypeDesc_Error(env : IterVisitorBase[T], exception_decl : ExceptionDecl) -> Unitfn[T : IterVisitor] visit_TypeDesc_Record(env : IterVisitorBase[T], fields~ : List[FieldDecl]) -> Unitfn[T : IterVisitor] visit_TypeDesc_TupleStruct(env : IterVisitorBase[T], types : List[Type]) -> Unitfn[T : IterVisitor] visit_TypeDesc_Variant(env : IterVisitorBase[T], constr_decls : List[ConstrDecl]) -> Unitfn[T : IterVisitor] visit_TypeVarBinder(env : IterVisitorBase[T], type_var_binder : TypeVarBinder) -> Unitfn[T : IterVisitor] visit_TypeVarConstraint(env : IterVisitorBase[T], type_var_constraint : TypeVarConstraint) -> Unitfn[T : IterVisitor] visit_Type_Arrow(env : IterVisitorBase[T], args~ : List[Type], res~ : Type, err~ : ErrorType, is_async~ : Location?, loc~ : Location) -> Unitfn[T : IterVisitor] visit_Type_Name(env : IterVisitorBase[T], constr_id~ : ConstrId, tys~ : List[Type], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Type_Option(env : IterVisitorBase[T], ty~ : Type, loc~ : Location, question_loc~ : Location) -> Unitfn[T : IterVisitor] visit_Type_Tuple(env : IterVisitorBase[T], tys~ : List[Type], loc~ : Location) -> Unitfn[T : IterVisitor] visit_Visibility_Pub(_ : IterVisitorBase[T], attr~ : String?, loc~ : Location) -> Unitpub(all) enum LexPattern {
Regex(lit~ : String, offset~ : Int, loc~ : Location)
RegexInterp(elems~ : List[InterpElem], loc~ : Location)
ConstantRef(lid~ : LongIdent, loc~ : Location)
Alias(pat~ : LexPattern, binder~ : Binder, loc~ : Location)
Sequence(pats~ : List[LexPattern], loc~ : Location)
} derive(Debug)pub(all) enum LexScanCasePattern {
Pattern(RegexPattern)
Binder(Binder)
Wildcard(loc~ : Location)
} derive(Debug)pub(all) enum LexTopPattern {
Pattern(LexPattern)
Binder(Binder)
Wildcard(loc~ : Location)
} derive(Debug)pub(all) struct MapVisitorBase[T](T)impl MapVisitor for MapVisitorBase[T]fn[T : MapVisitor] visit_Accessor_Index(_ : MapVisitorBase[T], tuple_index~ : Int, loc~ : Location) -> Accessorfn[T : MapVisitor] visit_AliasTarget(env : MapVisitorBase[T], alias_target : AliasTarget) -> AliasTargetfn[T : MapVisitor] visit_ArgumentKind(env : MapVisitorBase[T], argument_kind : ArgumentKind) -> ArgumentKindfn[T : MapVisitor] visit_ArgumentKind_Labelled(_ : MapVisitorBase[T], label : Label) -> ArgumentKindfn[T : MapVisitor] visit_ArgumentKind_LabelledOption(_ : MapVisitorBase[T], label~ : Label, question_loc~ : Location) -> ArgumentKindfn[T : MapVisitor] visit_ArgumentKind_LabelledOptionPun(_ : MapVisitorBase[T], label~ : Label, question_loc~ : Location) -> ArgumentKindfn[T : MapVisitor] visit_ArgumentKind_LabelledPun(_ : MapVisitorBase[T], label : Label) -> ArgumentKindfn[T : MapVisitor] visit_ArrayPattern(env : MapVisitorBase[T], array_pattern : ArrayPattern) -> ArrayPatternfn[T : MapVisitor] visit_ArrayPattern_BytesSpread(_ : MapVisitorBase[T], bytes~ : String, loc~ : Location) -> ArrayPatternfn[T : MapVisitor] visit_ArrayPattern_ConstSpread(env : MapVisitorBase[T], binder~ : Binder, pkg~ : String?, loc~ : Location) -> ArrayPatternfn[T : MapVisitor] visit_ArrayPattern_Pattern(env : MapVisitorBase[T], pattern : Pattern) -> ArrayPatternfn[T : MapVisitor] visit_ArrayPattern_StringSpread(_ : MapVisitorBase[T], str~ : String, loc~ : Location) -> ArrayPatternfn[T : MapVisitor] visit_ArrayPatterns(env : MapVisitorBase[T], array_patterns : ArrayPatterns) -> ArrayPatternsfn[T : MapVisitor] visit_ArrayPatterns_Closed(env : MapVisitorBase[T], array_patterns : List[ArrayPattern]) -> ArrayPatternsfn[T : MapVisitor] visit_ArrayPatterns_Open(env : MapVisitorBase[T], prefix_patterns : List[ArrayPattern], suffix_patterns : List[ArrayPattern], dot_dot_binder : DotDotBinder) -> ArrayPatternsfn[T : MapVisitor] visit_ConstrDecl(env : MapVisitorBase[T], constr_decl : ConstrDecl) -> ConstrDeclfn[T : MapVisitor] visit_ConstrParam(env : MapVisitorBase[T], constr_param : ConstrParam) -> ConstrParamfn[T : MapVisitor] visit_ConstrPatArg(env : MapVisitorBase[T], constr_pat_arg : ConstrPatArg) -> ConstrPatArgfn[T : MapVisitor] visit_Constructor(env : MapVisitorBase[T], constructor_ : Constructor) -> Constructorfn[T : MapVisitor] visit_ConstructorExtraInfo(env : MapVisitorBase[T], constructor_extra_info : ConstructorExtraInfo) -> ConstructorExtraInfofn[T : MapVisitor] visit_ConstructorExtraInfo_Package(_ : MapVisitorBase[T], package_ : String) -> ConstructorExtraInfofn[T : MapVisitor] visit_ConstructorExtraInfo_TypeName(env : MapVisitorBase[T], type_name : TypeName) -> ConstructorExtraInfofn[T : MapVisitor] visit_DeclBody_DeclStubs(env : MapVisitorBase[T], func_stubs : FuncStubs) -> DeclBodyfn[T : MapVisitor] visit_DerivingDirective(env : MapVisitorBase[T], deriving_directive : DerivingDirective) -> DerivingDirectivefn[T : MapVisitor] visit_DotDotBinder(env : MapVisitorBase[T], dot_dot_binder : DotDotBinder) -> DotDotBinderfn[T : MapVisitor] visit_DotDotBinder_Binder(env : MapVisitorBase[T], binder : Binder) -> DotDotBinderfn[T : MapVisitor] visit_DotDotBinder_BinderAs(env : MapVisitorBase[T], binder : Binder) -> DotDotBinderfn[T : MapVisitor] visit_EmbeddedCode(env : MapVisitorBase[T], embedded_code : EmbeddedCode) -> EmbeddedCodefn[T : MapVisitor] visit_EmbeddedCode_CodeMultilineString(_ : MapVisitorBase[T], strings : List[String]) -> EmbeddedCodefn[T : MapVisitor] visit_EmbeddedCode_CodeString(_ : MapVisitorBase[T], string_literal : String) -> EmbeddedCodefn[T : MapVisitor] visit_ErrorType_DefaultErrorType(_ : MapVisitorBase[T], loc~ : Location) -> ErrorTypefn[T : MapVisitor] visit_ExceptionDecl(env : MapVisitorBase[T], exception_decl : ExceptionDecl) -> ExceptionDeclfn[T : MapVisitor] visit_ExceptionDecl_EnumPayload(env : MapVisitorBase[T], constr_decls : List[ConstrDecl]) -> ExceptionDeclfn[T : MapVisitor] visit_Expr_Apply(env : MapVisitorBase[T], func~ : Expr, args~ : List[Argument], loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Array(env : MapVisitorBase[T], exprs~ : List[Expr], is_iter~ : Bool, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_ArrayAugmentedSet(env : MapVisitorBase[T], op~ : Var, array~ : Expr, index~ : Expr, value~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_ArrayGet(env : MapVisitorBase[T], array~ : Expr, index~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_ArrayGetSlice(env : MapVisitorBase[T], array~ : Expr, start_index~ : Expr?, end_index~ : Expr?, index_loc~ : Location, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_ArraySet(env : MapVisitorBase[T], array~ : Expr, index~ : Expr, value~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_ArraySpread(env : MapVisitorBase[T], elems~ : List[SpreadableElem], is_iter~ : Bool, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_As(env : MapVisitorBase[T], expr~ : Expr, trait_~ : TypeName, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Assign(env : MapVisitorBase[T], var_~ : Var, expr~ : Expr, augmented_by~ : Var?, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Break(env : MapVisitorBase[T], arg~ : Expr?, label~ : Label?, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_BytesInterp(env : MapVisitorBase[T], elems~ : List[InterpElem], loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Constant(env : MapVisitorBase[T], c~ : Constant, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Constr(env : MapVisitorBase[T], constr~ : Constructor, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Constraint(env : MapVisitorBase[T], expr~ : Expr, ty~ : Type, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Continue(env : MapVisitorBase[T], args~ : List[Expr], label~ : Label?, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Defer(env : MapVisitorBase[T], expr~ : Expr, body~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_DotApply(env : MapVisitorBase[T], self~ : Expr, method_name~ : Label, args~ : List[Argument], return_self~ : Bool, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Field(env : MapVisitorBase[T], record~ : Expr, accessor~ : Accessor, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_For(env : MapVisitorBase[T], binders~ : List[(Binder, Expr)], condition~ : Expr?, continue_block~ : List[(Binder, Expr)], body~ : Expr, for_else~ : Expr?, label~ : Label?, loc~ : Location, where_clause~ : WhereClause?) -> Exprfn[T : MapVisitor] visit_Expr_Function(env : MapVisitorBase[T], func~ : Func, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Group(env : MapVisitorBase[T], expr~ : Expr, group~ : Group, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Guard(env : MapVisitorBase[T], cond~ : Expr, otherwise~ : Expr?, body~ : Expr, exclamation~ : Bool, guard_loc~ : Location, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_If(env : MapVisitorBase[T], cond~ : Expr, ifso~ : Expr, ifnot~ : Expr?, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Infix(env : MapVisitorBase[T], op~ : Var, lhs~ : Expr, rhs~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Interp(env : MapVisitorBase[T], elems~ : List[InterpElem], loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Is(env : MapVisitorBase[T], expr~ : Expr, pat~ : Pattern, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_LabelledBlock(env : MapVisitorBase[T], label~ : Label, body~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Let(env : MapVisitorBase[T], pattern~ : Pattern, expr~ : Expr, body~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_LetAnd(env : MapVisitorBase[T], bindings~ : List[(Binder, Type?, Func)], body~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_LetFn(env : MapVisitorBase[T], name~ : Binder, func~ : Func, body~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_LetMut(env : MapVisitorBase[T], binder~ : Binder, ty~ : Type?, expr~ : Expr, body~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_LexMatch(env : MapVisitorBase[T], strategy~ : Label?, expr~ : Expr, match_loc~ : Location, cases~ : List[LexCase], loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_LexScan(env : MapVisitorBase[T], strategy~ : Label?, expr~ : Expr, match_loc~ : Location, cases~ : List[LexScanCase], loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Map(env : MapVisitorBase[T], elems~ : List[MapExprElem], loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Match(env : MapVisitorBase[T], expr~ : Expr, cases~ : List[Case], match_loc~ : Location, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Method(env : MapVisitorBase[T], type_name~ : TypeName, method_name~ : Label, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_MultilineString(env : MapVisitorBase[T], elems~ : List[MultilineStringElem], loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Mutate(env : MapVisitorBase[T], record~ : Expr, accessor~ : Accessor, field~ : Expr, augmented_by~ : Var?, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Pipe(env : MapVisitorBase[T], lhs~ : Expr, rhs~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Raise(env : MapVisitorBase[T], err_value~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Record(env : MapVisitorBase[T], type_name~ : TypeName?, fields~ : List[FieldDef], trailing~ : TrailingMark, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_RecordUpdate(env : MapVisitorBase[T], type_name~ : TypeName?, record~ : Expr, fields~ : List[FieldDef], loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Return(env : MapVisitorBase[T], return_value~ : Expr?, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Sequence(env : MapVisitorBase[T], exprs~ : List[Expr], last_expr~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_StaticAssert(env : MapVisitorBase[T], asserts~ : List[StaticAssertion], body~ : Expr) -> Exprfn[T : MapVisitor] visit_Expr_TryOperator(env : MapVisitorBase[T], body~ : Expr, kind~ : TryOperatorKind, try_loc~ : Location, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Tuple(env : MapVisitorBase[T], exprs~ : List[Expr], loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_Unary(env : MapVisitorBase[T], op~ : Var, expr~ : Expr, loc~ : Location) -> Exprfn[T : MapVisitor] visit_Expr_While(env : MapVisitorBase[T], loop_cond~ : Expr, loop_body~ : Expr, while_else~ : Expr?, label~ : Label?, loc~ : Location) -> Exprfn[T : MapVisitor] visit_FuncStubs_Embedded(env : MapVisitorBase[T], language~ : String?, code~ : EmbeddedCode) -> FuncStubsfn[T : MapVisitor] visit_FuncStubs_Import(_ : MapVisitorBase[T], module_name~ : String, func_name~ : String, language~ : String?) -> FuncStubsfn[T : MapVisitor] visit_Impl_TopExpr(env : MapVisitorBase[T], expr~ : Expr, is_main~ : Bool, is_async~ : Location?, loc~ : Location) -> Implfn[T : MapVisitor] visit_Impl_TopExtend(env : MapVisitorBase[T], type_name~ : TypeName, trait_~ : TypeName, names~ : List[AliasTarget], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString) -> Implfn[T : MapVisitor] visit_Impl_TopFuncDef(env : MapVisitorBase[T], fun_decl~ : FunDecl, decl_body~ : DeclBody, where_clause~ : WhereClause?, loc~ : Location) -> Implfn[T : MapVisitor] visit_Impl_TopImpl(env : MapVisitorBase[T], self_ty~ : Type?, trait_~ : TypeName, method_name~ : Binder, quantifiers~ : List[TypeVarBinder], method_quantifiers~ : List[TypeVarBinder], params~ : List[Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString) -> Implfn[T : MapVisitor] visit_Impl_TopImplRelation(env : MapVisitorBase[T], self_ty~ : Type, trait_~ : TypeName, quantifiers~ : List[TypeVarBinder], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString, is_declare~ : Bool) -> Implfn[T : MapVisitor] visit_Impl_TopImport(env : MapVisitorBase[T], kind~ : String?, packages~ : List[ImportPackage], loc~ : Location, doc~ : DocString) -> Implfn[T : MapVisitor] visit_Impl_TopLetDef(env : MapVisitorBase[T], binder~ : Binder, ty~ : Type?, expr~ : Expr, vis~ : Visibility, is_constant~ : Bool, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString, is_declare~ : Bool) -> Implfn[T : MapVisitor] visit_Impl_TopUsing(env : MapVisitorBase[T], pkg~ : Label, names~ : List[(AliasTarget, UsingKind)], vis~ : Visibility, attrs~ : List[Attribute], loc~ : Location, doc~ : DocString) -> Implfn[T : MapVisitor] visit_Impl_TopView(env : MapVisitorBase[T], quantifiers~ : List[TypeVarBinder], source_ty~ : Type, view_type_name~ : String, view_type_loc~ : Location, view_constrs~ : List[ConstrDecl], view_func_name~ : Binder, parameters~ : List[Parameter], params_loc~ : Location, body~ : Expr, vis~ : Visibility, loc~ : Location, attrs~ : List[Attribute], doc~ : DocString) -> Implfn[T : MapVisitor] visit_ImportPackage(_ : MapVisitorBase[T], import_package : ImportPackage) -> ImportPackagefn[T : MapVisitor] visit_InterpElem(env : MapVisitorBase[T], interp_elem : InterpElem) -> InterpElemfn[T : MapVisitor] visit_InterpElem_Expr(env : MapVisitorBase[T], expr~ : Expr, loc~ : Location) -> InterpElemfn[T : MapVisitor] visit_InterpElem_Literal(_ : MapVisitorBase[T], repr~ : String, loc~ : Location) -> InterpElemfn[T : MapVisitor] visit_InterpElem_Source(_ : MapVisitorBase[T], interp_source : InterpSource) -> InterpElemfn[T : MapVisitor] visit_LexPattern(env : MapVisitorBase[T], lex_pattern : LexPattern) -> LexPatternfn[T : MapVisitor] visit_LexPattern_Alias(env : MapVisitorBase[T], pat~ : LexPattern, binder~ : Binder, loc~ : Location) -> LexPatternfn[T : MapVisitor] visit_LexPattern_ConstantRef(env : MapVisitorBase[T], lid~ : LongIdent, loc~ : Location) -> LexPatternfn[T : MapVisitor] visit_LexPattern_Regex(env : MapVisitorBase[T], lit~ : String, offset~ : Int, loc~ : Location) -> LexPatternfn[T : MapVisitor] visit_LexPattern_RegexInterp(env : MapVisitorBase[T], elems~ : List[InterpElem], loc~ : Location) -> LexPatternfn[T : MapVisitor] visit_LexPattern_Sequence(env : MapVisitorBase[T], pats~ : List[LexPattern], loc~ : Location) -> LexPatternfn[T : MapVisitor] visit_LexScanCase(env : MapVisitorBase[T], lex_scan_case : LexScanCase) -> LexScanCasefn[T : MapVisitor] visit_LexScanCasePattern(env : MapVisitorBase[T], lex_scan_case_pattern : LexScanCasePattern) -> LexScanCasePatternfn[T : MapVisitor] visit_LexScanCasePattern_Binder(env : MapVisitorBase[T], binder : Binder) -> LexScanCasePatternfn[T : MapVisitor] visit_LexScanCasePattern_Pattern(env : MapVisitorBase[T], regex_pattern : RegexPattern) -> LexScanCasePatternfn[T : MapVisitor] visit_LexScanCasePattern_Wildcard(env : MapVisitorBase[T], loc~ : Location) -> LexScanCasePatternfn[T : MapVisitor] visit_LexTopPattern(env : MapVisitorBase[T], lex_top_pattern : LexTopPattern) -> LexTopPatternfn[T : MapVisitor] visit_LexTopPattern_Binder(env : MapVisitorBase[T], binder : Binder) -> LexTopPatternfn[T : MapVisitor] visit_LexTopPattern_Pattern(env : MapVisitorBase[T], lex_pattern : LexPattern) -> LexTopPatternfn[T : MapVisitor] visit_LexTopPattern_Wildcard(env : MapVisitorBase[T], loc~ : Location) -> LexTopPatternfn[T : MapVisitor] visit_LongIdent_Dot(_ : MapVisitorBase[T], pkg~ : String, id~ : String) -> LongIdentfn[T : MapVisitor] visit_MapExprElem(env : MapVisitorBase[T], mapexpr_elem : MapExprElem) -> MapExprElemfn[T : MapVisitor] visit_MapPatElem(env : MapVisitorBase[T], mappat_elem : MapPatElem) -> MapPatElemfn[T : MapVisitor] visit_MultilineStringElem(env : MapVisitorBase[T], multiline_string_elem : MultilineStringElem) -> MultilineStringElemfn[T : MapVisitor] visit_MultilineStringElem_Interp(_ : MapVisitorBase[T], interp_elems : List[InterpElem]) -> MultilineStringElemfn[T : MapVisitor] visit_MultilineStringElem_String(_ : MapVisitorBase[T], string_val : String) -> MultilineStringElemfn[T : MapVisitor] visit_Parameter_DiscardPositional(env : MapVisitorBase[T], ty~ : Type?, loc~ : Location) -> Parameterfn[T : MapVisitor] visit_Parameter_Labelled(env : MapVisitorBase[T], binder~ : Binder, ty~ : Type?) -> Parameterfn[T : MapVisitor] visit_Parameter_Optional(env : MapVisitorBase[T], binder~ : Binder, default~ : Expr, ty~ : Type?) -> Parameterfn[T : MapVisitor] visit_Parameter_Positional(env : MapVisitorBase[T], binder~ : Binder, ty~ : Type?) -> Parameterfn[T : MapVisitor] visit_Parameter_QuestionOptional(env : MapVisitorBase[T], binder~ : Binder, ty~ : Type?) -> Parameterfn[T : MapVisitor] visit_Pattern_Alias(env : MapVisitorBase[T], pat~ : Pattern, alias_~ : Binder, loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_Array(env : MapVisitorBase[T], pats~ : ArrayPatterns, loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_Constant(env : MapVisitorBase[T], c~ : Constant, loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_Constr(env : MapVisitorBase[T], constr~ : Constructor, args~ : List[ConstrPatArg]?, is_open~ : Bool, loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_Constraint(env : MapVisitorBase[T], pat~ : Pattern, ty~ : Type, loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_Map(env : MapVisitorBase[T], elems~ : List[MapPatElem], is_closed~ : Bool, loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_Or(env : MapVisitorBase[T], pat1~ : Pattern, pat2~ : Pattern, loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_Range(env : MapVisitorBase[T], lhs~ : Pattern, rhs~ : Pattern, kind~ : RangeKind, loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_Record(env : MapVisitorBase[T], fields~ : List[FieldPat], is_closed~ : Bool, loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_SpecialConstr(env : MapVisitorBase[T], binder~ : Binder, args~ : List[ConstrPatArg], loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_Tuple(env : MapVisitorBase[T], pats~ : List[Pattern], loc~ : Location) -> Patternfn[T : MapVisitor] visit_Pattern_With(env : MapVisitorBase[T], pat~ : Pattern, bindings~ : List[(Binder, Expr)], loc~ : Location) -> Patternfn[T : MapVisitor] visit_SpreadableElem(env : MapVisitorBase[T], spreadable_elem : SpreadableElem) -> SpreadableElemfn[T : MapVisitor] visit_SpreadableElem_Regular(env : MapVisitorBase[T], expr : Expr) -> SpreadableElemfn[T : MapVisitor] visit_SpreadableElem_Spread(env : MapVisitorBase[T], expr~ : Expr, loc~ : Location) -> SpreadableElemfn[T : MapVisitor] visit_StaticAssertion(env : MapVisitorBase[T], static_assertion : StaticAssertion) -> StaticAssertionfn[T : MapVisitor] visit_TrailingMark(_ : MapVisitorBase[T], trailing_mark : TrailingMark) -> TrailingMarkfn[T : MapVisitor] visit_TraitMethodDecl(env : MapVisitorBase[T], method_decl : TraitMethodDecl) -> TraitMethodDeclfn[T : MapVisitor] visit_TryOperatorKind(_ : MapVisitorBase[T], try_operator_kind : TryOperatorKind) -> TryOperatorKindfn[T : MapVisitor] visit_TypeDeclBinder(_ : MapVisitorBase[T], type_decl_binder : TypeDeclBinder) -> TypeDeclBinderfn[T : MapVisitor] visit_TypeDesc_Error(env : MapVisitorBase[T], exception_decl : ExceptionDecl) -> TypeDescfn[T : MapVisitor] visit_TypeDesc_Record(env : MapVisitorBase[T], fields~ : List[FieldDecl]) -> TypeDescfn[T : MapVisitor] visit_TypeDesc_TupleStruct(env : MapVisitorBase[T], types : List[Type]) -> TypeDescfn[T : MapVisitor] visit_TypeDesc_Variant(env : MapVisitorBase[T], constr_decls : List[ConstrDecl]) -> TypeDescfn[T : MapVisitor] visit_TypeVarBinder(env : MapVisitorBase[T], type_var_binder : TypeVarBinder) -> TypeVarBinderfn[T : MapVisitor] visit_TypeVarConstraint(env : MapVisitorBase[T], type_var_constraint : TypeVarConstraint) -> TypeVarConstraintfn[T : MapVisitor] visit_Type_Arrow(env : MapVisitorBase[T], args~ : List[Type], res~ : Type, err~ : ErrorType, is_async~ : Location?, loc~ : Location) -> Typefn[T : MapVisitor] visit_Type_Name(env : MapVisitorBase[T], constr_id~ : ConstrId, tys~ : List[Type], loc~ : Location) -> Typefn[T : MapVisitor] visit_Type_Option(env : MapVisitorBase[T], ty~ : Type, loc~ : Location, question_loc~ : Location) -> Typefn[T : MapVisitor] visit_Type_Tuple(env : MapVisitorBase[T], tys~ : List[Type], loc~ : Location) -> Typefn[T : MapVisitor] visit_Visibility_Pub(_ : MapVisitorBase[T], attr~ : String?, loc~ : Location) -> Visibilityfn[T : MapVisitor] visit_WhereClause(env : MapVisitorBase[T], where_clause : WhereClause) -> WhereClausepub(all) enum Pattern {
Alias(pat~ : Pattern, alias_~ : Binder, loc~ : Location)
Any(loc~ : Location)
Array(pats~ : ArrayPatterns, loc~ : Location)
Constant(c~ : Constant, loc~ : Location)
Constraint(pat~ : Pattern, ty~ : Type, loc~ : Location)
Constr(constr~ : Constructor, args~ : List[ConstrPatArg]?, is_open~ : Bool, loc~ : Location)
Or(pat1~ : Pattern, pat2~ : Pattern, loc~ : Location)
Tuple(pats~ : List[Pattern], loc~ : Location)
Var(Binder)
Record(fields~ : List[FieldPat], is_closed~ : Bool, loc~ : Location)
Map(elems~ : List[MapPatElem], is_closed~ : Bool, loc~ : Location)
Range(lhs~ : Pattern, rhs~ : Pattern, kind~ : RangeKind, loc~ : Location)
With(pat~ : Pattern, bindings~ : List[(Binder, Expr)], loc~ : Location)
SpecialConstr(binder~ : Binder, args~ : List[ConstrPatArg], loc~ : Location)
} derive(Debug)pub(all) enum RegexPattern {
Literal(lit~ : String, loc~ : Location)
Reference(lid~ : LongIdent, loc~ : Location)
Sequence(pat1~ : RegexPattern, pat2~ : RegexPattern, loc~ : Location)
Alternation(pat1~ : RegexPattern, pat2~ : RegexPattern, loc~ : Location)
Alias(pat~ : RegexPattern, binder~ : Binder, loc~ : Location)
} derive(Debug)pub(all) struct TraitDecl {
name : Binder
supers : List[TypeVarConstraint]
methods : List[TraitMethodDecl]
vis : Visibility
loc : Location
attrs : List[Attribute]
doc : DocString
is_declare : Bool
} derive(Debug)pub(all) enum Type {
Any(loc~ : Location)
Arrow(args~ : List[Type], res~ : Type, err~ : ErrorType, is_async~ : Location?, loc~ : Location)
Tuple(tys~ : List[Type], loc~ : Location)
Name(constr_id~ : ConstrId, tys~ : List[Type], loc~ : Location)
Option(ty~ : Type, loc~ : Location, question_loc~ : Location)
Object(ConstrId)
} derive(Debug)pub(all) struct TypeDecl {
tycon : String
tycon_loc : Location
params : List[TypeDeclBinder]
components : TypeDesc
attrs : List[Attribute]
doc : DocString
type_vis : Visibility
deriving : List[DerivingDirective]
loc : Location
is_declare : Bool
} derive(Debug)pub(all) enum TypeDesc {
Abstract
ExtensibleEnum(List[ConstrDecl])
Error(ExceptionDecl)
Variant(List[ConstrDecl])
ExtendEnum(target~ : TypeName, constructors~ : List[ConstrDecl])
Record(fields~ : List[FieldDecl])
TupleStruct(List[Type])
Alias(Type)
} derive(Debug)pub(all) struct TypeVarBinder {
name : String
name_loc : Location
constraints : List[TypeVarConstraint]
} derive(Debug)fn [T] f() -> Unit {...}
// ^---- TypeVarBinder
fn [T : TraitA + TraitB] f() -> Unit {...}
// ^^^^^^^^^^^^^^^^^^^----- TypeVarBinderfn make_constr_pattern(loc~ : Location, constr : Constructor, args : List[ConstrPatArg]?, is_open : Bool) -> PatternAST and parsers for the MoonBit programming language
Dependencies