Sign in

    moonbitlang/parser/syntax does not have a README file

    Parameters

    TestName

    typealias (String,
    Location
    )? as TestName

    ImplMapVisitor

    pub(open) trait ImplMapVisitor {
    visit_impl(Self, Impl) -> Impl = _
    visit_top_expr(Self, expr~ : Expr, is_main~ : Bool, local_types~ :
    List
    [LocalTypeDecl], loc~ :
    Location
    ) -> Impl = _
    visit_top_test(Self, expr~ : Expr, name~ : (String,
    Location
    )?, params~ :
    List
    [Parameter]?, local_types~ :
    List
    [LocalTypeDecl], loc~ :
    Location
    , attrs~ :
    List
    [Attribute], doc~ : DocString) -> Impl = _
    visit_top_type_def(Self, TypeDecl) -> Impl = _
    visit_top_func_def(Self, fun_decl~ : FunDecl, decl_body~ : DeclBody, loc~ :
    Location
    ) -> Impl = _
    visit_top_func_alias(Self, pkg~ : Label?, type_name~ : Label?, targets~ :
    List
    [AliasTarget], vis~ : Visibility, attrs~ :
    List
    [Attribute], is_list~ : Bool, doc~ : DocString, loc~ :
    Location
    ) -> Impl = _
    visit_top_let_def(Self, binder~ : Binder, ty~ : Type?, expr~ : Expr, vis~ : Visibility, is_constant~ : Bool, loc~ :
    Location
    , attrs~ :
    List
    [Attribute], doc~ : DocString) -> Impl = _
    visit_top_trait(Self, TraitDecl) -> Impl = _
    visit_top_batch_type_alias(Self, pkg~ : Label?, targets~ :
    List
    [AliasTarget], vis~ : Visibility, loc~ :
    Location
    , attrs~ :
    List
    [Attribute], is_list~ : Bool, doc~ : DocString) -> Impl = _
    visit_top_batch_trait_alias(Self, pkg~ : Label?, targets~ :
    List
    [AliasTarget], vis~ : Visibility, loc~ :
    Location
    , attrs~ :
    List
    [Attribute], is_list~ : Bool, doc~ : DocString) -> Impl = _
    visit_top_impl(Self, self_ty~ : Type?, trait_~ : TypeName, method_name~ : Binder, has_error~ :
    Location
    ?, quantifiers~ :
    List
    [TypeVarBinder], params~ :
    List
    [Parameter], ret_ty~ : Type?, err_ty~ : ErrorType, body~ : DeclBody, vis~ : Visibility, loc~ :
    Location
    , attrs~ :
    List
    [Attribute], doc~ : DocString) -> Impl = _
    visit_top_view(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 = _
    visit_top_impl_relation(Self, self_ty~ : Type, trait_~ : TypeName, quantifiers~ :
    List
    [TypeVarBinder], vis~ : Visibility, attrs~ :
    List
    [Attribute], loc~ :
    Location
    , doc~ : DocString) -> Impl = _
    visit_expr(Self, Expr) -> Expr = _
    visit_apply(Self, func~ : Expr, args~ :
    List
    [Argument], attr~ : ApplyAttr, loc~ :
    Location
    ) -> Expr = _
    visit_infix(Self, op~ : Var, lhs~ : Expr, rhs~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_unary(Self, op~ : Var, expr~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_array(Self, exprs~ :
    List
    [Expr], loc~ :
    Location
    ) -> Expr = _
    visit_array_spread(Self, elems~ :
    List
    [SpreadableElem], loc~ :
    Location
    ) -> Expr = _
    visit_array_get(Self, array~ : Expr, index~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_array_get_slice(Self, array~ : Expr, start_index~ : Expr?, end_index~ : Expr?, index_loc~ :
    Location
    , loc~ :
    Location
    ) -> Expr = _
    visit_array_set(Self, array~ : Expr, index~ : Expr, value~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_array_augmented_set(Self, op~ : Var, array~ : Expr, index~ : Expr, value~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_constant(Self, c~ : Constant, loc~ :
    Location
    ) -> Expr = _
    visit_multiline_string(Self, elems~ :
    List
    [MultilineStringElem], loc~ :
    Location
    ) -> Expr = _
    visit_interp(Self, elems~ :
    List
    [InterpElem], loc~ :
    Location
    ) -> Expr = _
    visit_constraint(Self, expr~ : Expr, ty~ : Type, loc~ :
    Location
    ) -> Expr = _
    visit_constr(Self, constr~ : Constructor, loc~ :
    Location
    ) -> Expr = _
    visit_while(Self, loop_cond~ : Expr, loop_body~ : Expr, while_else~ : Expr?, label~ : Label?, loc~ :
    Location
    ) -> Expr = _
    visit_function(Self, func~ : Func, loc~ :
    Location
    ) -> Expr = _
    visit_ident(Self, id~ : Var, loc~ :
    Location
    ) -> Expr = _
    visit_if(Self, cond~ : Expr, ifso~ : Expr, ifnot~ : Expr?, loc~ :
    Location
    ) -> Expr = _
    visit_guard(Self, cond~ : Expr, otherwise~ : Expr?, body~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_is(Self, expr~ : Expr, pat~ : Pattern, loc~ :
    Location
    ) -> Expr = _
    visit_defer(Self, expr~ : Expr, body~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_let_fn(Self, name~ : Binder, func~ : Func, body~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_let_rec(Self, bindings~ :
    List
    [(Binder, Func)], body~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_let_and(Self, bindings~ :
    List
    [(Binder, Type?, Func)], body~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_let(Self, pattern~ : Pattern, expr~ : Expr, body~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_sequence(Self, exprs~ :
    List
    [Expr], last_expr~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_tuple(Self, exprs~ :
    List
    [Expr], loc~ :
    Location
    ) -> Expr = _
    visit_record(Self, type_name~ : TypeName?, fields~ :
    List
    [FieldDef], trailing~ : TrailingMark, loc~ :
    Location
    ) -> Expr = _
    visit_record_update(Self, type_name~ : TypeName?, record~ : Expr, fields~ :
    List
    [FieldDef], loc~ :
    Location
    ) -> Expr = _
    visit_field(Self, record~ : Expr, accessor~ : Accessor, loc~ :
    Location
    ) -> Expr = _
    visit_method(Self, type_name~ : TypeName, method_name~ : Label, loc~ :
    Location
    ) -> Expr = _
    visit_dot_apply(Self, self~ : Expr, method_name~ : Label, args~ :
    List
    [Argument], return_self~ : Bool, attr~ : ApplyAttr, loc~ :
    Location
    ) -> Expr = _
    visit_as(Self, expr~ : Expr, trait_~ : TypeName, loc~ :
    Location
    ) -> Expr = _
    visit_mutate(Self, record~ : Expr, accessor~ : Accessor, field~ : Expr, augmented_by~ : Var?, loc~ :
    Location
    ) -> Expr = _
    visit_match(Self, expr~ : Expr, cases~ :
    List
    [Case], match_loc~ :
    Location
    , using_~ : Label?, loc~ :
    Location
    ) -> Expr = _
    visit_let_mut(Self, binder~ : Binder, ty~ : Type?, expr~ : Expr, body~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_pipe(Self, lhs~ : Expr, rhs~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_assign(Self, var_~ : Var, expr~ : Expr, augmented_by~ : Var?, loc~ :
    Location
    ) -> Expr = _
    visit_hole(Self, loc~ :
    Location
    , kind~ : Hole) -> Expr = _
    visit_return(Self, return_value~ : Expr?, loc~ :
    Location
    ) -> Expr = _
    visit_raise(Self, err_value~ : Expr, loc~ :
    Location
    ) -> Expr = _
    visit_unit(Self, loc~ :
    Location
    , faked~ : Bool) -> Expr = _
    visit_break(Self, arg~ : Expr?, label~ : Label?, loc~ :
    Location
    ) -> Expr = _
    visit_continue(Self, args~ :
    List
    [Expr], label~ : Label?, loc~ :
    Location
    ) -> Expr = _
    visit_loop(Self, args~ :
    List
    [Expr], body~ :
    List
    [MultiArgCase], label~ : Label?, loop_loc~ :
    Location
    , loc~ :
    Location
    ) -> Expr = _
    visit_for(Self, binders~ :
    List
    [(Binder, Expr)], condition~ : Expr?, continue_block~ :
    List
    [(Binder, Expr)], body~ : Expr, for_else~ : Expr?, label~ : Label?, loc~ :
    Location
    ) -> Expr = _
    visit_for_each(Self, binders~ :
    List
    [Binder?], expr~ : Expr, body~ : Expr, else_block~ : Expr?, label~ : Label?, loc~ :
    Location
    ) -> Expr = _
    visit_try(Self, body~ : Expr, catch_~ :
    List
    [Case], catch_all~ : Bool, try_else~ :
    List
    [Case]?, has_try~ : Bool, try_loc~ :
    Location
    , catch_loc~ :
    Location
    , else_loc~ :
    Location
    , loc~ :
    Location
    ) -> Expr = _
    visit_try_operator(Self, body~ : Expr, kind~ : TryOperatorKind, try_loc~ :
    Location
    , loc~ :
    Location
    ) -> Expr = _
    visit_map(Self, elems~ :
    List
    [MapExprElem], loc~ :
    Location
    ) -> Expr = _
    visit_group(Self, expr~ : Expr, group~ : Group, loc~ :
    Location
    ) -> Expr = _
    visit_static_assert(Self, asserts~ :
    List
    [StaticAssertion], body~ : Expr) -> Expr = _
    }

    Accessor

    impl ToJson for Accessor

    AliasTarget

    pub(all) struct AliasTarget {
    binder : Binder
    target : Label?
    }

    ApplyAttr

    pub(all) enum ApplyAttr {
    NoAttr
    Exclamation
    Question
    }

    impl ToJson for ApplyAttr

    Argument

    pub(all) struct Argument {
    value : Expr
    kind : ArgumentKind
    }

    impl ToJson for Argument

    ArgumentKind

    pub(all) enum ArgumentKind {
    Positional
    Labelled(Label)
    LabelledPun(Label)
    LabelledOption(Label,
    Location
    )
    LabelledOptionPun(Label,
    Location
    )
    }

    ArrayPattern

    pub(all) enum ArrayPattern {
    Pattern(Pattern)
    StringSpread(String)
    BytesSpread(String)
    ConstSpread(Binder, String?,
    Location
    )
    }

    ArrowFnParam

    pub(all) enum ArrowFnParam {
    Named(Binder)
    Unnamed(
    Location
    )
    }
    Arrow function parameter type

    Attribute

    pub(all) struct Attribute {
    loc :
    Location

    raw : String
    parsed : AttributeExpr?
    }

    impl ToJson for Attribute

    AttributeExpr

    pub(all) enum AttributeExpr {
    Ident(AttributeId)
    Str(String)
    Apply(AttributeId,
    List
    [AttributeProp])
    }

    AttributeId

    pub(all) struct AttributeId {
    qual : String?
    name : String
    }

    AttributeProp

    pub(all) enum AttributeProp {
    Labeled(String, AttributeExpr)
    Expr(AttributeExpr)
    }

    Binder

    pub(all) struct Binder {
    name : String
    loc :
    Location

    }

    impl ToJson for Binder

    Case

    pub(all) struct Case {
    pattern : Pattern
    guard_ : Expr?
    body : Expr
    }

    impl ToJson for Case

    Constant

    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)
    BigInt(String)
    }

    impl ToJson for Constant

    ConstrId

    pub(all) struct ConstrId {
    id : LongIdent
    loc :
    Location

    }

    impl ToJson for ConstrId

    ConstrName

    pub(all) struct ConstrName {
    name : String
    loc :
    Location

    }

    ConstrParam

    pub(all) struct ConstrParam {
    ty : Type
    mut_ : Bool
    label : Label?
    }

    ConstrPatArg

    pub(all) struct ConstrPatArg {
    pat : Pattern
    kind : ArgumentKind
    }

    Constructor

    pub(all) struct Constructor {
    name : ConstrName
    extra_info : ConstructorExtraInfo
    loc :
    Location

    }

    ConstructorExtraInfo

    pub(all) enum ConstructorExtraInfo {
    TypeName(TypeName)
    Package(String)
    NoExtraInfo
    }

    DeclBody

    pub(all) enum DeclBody {
    DeclBody(
    List
    [LocalTypeDecl], Expr)
    DeclStubs(FuncStubs)
    }

    impl ToJson for DeclBody

    DerivingDirective

    pub(all) struct DerivingDirective {
    type_name : TypeName
    args :
    List
    [Argument]
    loc :
    Location

    }

    DocString

    pub(all) struct DocString {
    content :
    List
    [String]
    loc :
    Location

    }

    impl ToJson for DocString

    DocString::empty

    fn DocString::empty() -> DocString

    DotDotBinder

    pub(all) enum DotDotBinder {
    Underscore
    NoBinder
    BinderAs(Binder)
    Binder(Binder)
    }

    EmbeddedCode

    pub(all) enum EmbeddedCode {
    CodeString(String)
    CodeMultilineString(
    List
    [String])
    }

    ErrorType

    pub(all) enum ErrorType {
    ErrorType(Type)
    DefaultErrorType(
    Location
    )
    NoErrorType
    Noraise(
    Location
    )
    MaybeError(Type)
    }

    impl ToJson for ErrorType

    ExceptionDecl

    pub(all) enum ExceptionDecl {
    NoPayload
    SinglePayload(Type)
    EnumPayload(
    List
    [ConstrDecl])
    }

    Expr

    pub(all) enum Expr {
    Apply(Expr,
    List
    [Argument], ApplyAttr,
    Location
    )
    Infix(Var, Expr, Expr,
    Location
    )
    Unary(Var, Expr,
    Location
    )
    Array(
    List
    [Expr],
    Location
    )
    ArraySpread(
    List
    [SpreadableElem],
    Location
    )
    ArrayGet(Expr, Expr,
    Location
    )
    ArrayGetSlice(Expr, Expr?, Expr?,
    Location
    ,
    Location
    )
    ArraySet(Expr, Expr, Expr,
    Location
    )
    ArrayAugmentedSet(Var, Expr, Expr, Expr,
    Location
    )
    Constant(Constant,
    Location
    )
    MultilineString(
    List
    [MultilineStringElem],
    Location
    )
    Interp(
    List
    [InterpElem],
    Location
    )
    Constraint(Expr, Type,
    Location
    )
    Constr(Constructor,
    Location
    )
    While(Expr, Expr, Expr?, Label?,
    Location
    )
    Function(Func,
    Location
    )
    Ident(Var,
    Location
    )
    If(Expr, Expr, Expr?,
    Location
    )
    Guard(Expr, Expr?, Expr,
    Location
    )
    Is(Expr, Pattern,
    Location
    )
    Defer(Expr, Expr,
    Location
    )
    LetFn(Binder, Func, Expr,
    Location
    )
    LetRec(
    List
    [(Binder, Func)], Expr,
    Location
    )
    LetAnd(
    List
    [(Binder, Type?, Func)], Expr,
    Location
    )
    Let(Pattern, Expr, Expr,
    Location
    )
    Sequence(
    List
    [Expr], Expr,
    Location
    )
    Tuple(
    List
    [Expr],
    Location
    )
    Record(TypeName?,
    List
    [FieldDef], TrailingMark,
    Location
    )
    RecordUpdate(TypeName?, Expr,
    List
    [FieldDef],
    Location
    )
    Field(Expr, Accessor,
    Location
    )
    Method(TypeName, Label,
    Location
    )
    DotApply(Expr, Label,
    List
    [Argument], Bool, ApplyAttr,
    Location
    )
    As(Expr, TypeName,
    Location
    )
    Mutate(Expr, Accessor, Expr, Var?,
    Location
    )
    Match(Expr,
    List
    [Case],
    Location
    , Label?,
    Location
    )
    LetMut(Binder, Type?, Expr, Expr,
    Location
    )
    Pipe(Expr, Expr,
    Location
    )
    Assign(Var, Expr, Var?,
    Location
    )
    Hole(
    Location
    , Hole)
    Return(Expr?,
    Location
    )
    Raise(Expr,
    Location
    )
    Unit(
    Location
    , Bool)
    Break(Expr?, Label?,
    Location
    )
    Continue(
    List
    [Expr], Label?,
    Location
    )
    Loop(
    List
    [Expr],
    List
    [MultiArgCase], Label?,
    Location
    ,
    Location
    )
    For(
    List
    [(Binder, Expr)], Expr?,
    List
    [(Binder, Expr)], Expr, Expr?, Label?,
    Location
    )
    ForEach(
    List
    [Binder?], Expr, Expr, Expr?, Label?,
    Location
    )
    Try(Expr,
    List
    [Case], Bool,
    List
    [Case]?, Bool,
    Location
    ,
    Location
    ,
    Location
    ,
    Location
    )
    TryOperator(Expr, TryOperatorKind,
    Location
    ,
    Location
    )
    Map(
    List
    [MapExprElem],
    Location
    )
    Group(Expr, Group,
    Location
    )
    StaticAssert(
    List
    [StaticAssertion], Expr)
    }

    impl ToJson for Expr

    FieldDecl

    pub(all) struct FieldDecl {
    name : FieldName
    ty : Type
    mut_ : Bool
    vis : Visibility
    loc :
    Location

    attrs :
    List
    [Attribute]
    doc : DocString
    }

    impl ToJson for FieldDecl

    FieldDef

    pub(all) struct FieldDef {
    label : Label
    expr : Expr
    is_pun : Bool
    loc :
    Location

    }

    impl ToJson for FieldDef

    FieldName

    pub(all) struct FieldName {
    label : String
    loc :
    Location

    }

    impl ToJson for FieldName

    FieldPat

    pub(all) struct FieldPat {
    label : Label
    pattern : Pattern
    is_pun : Bool
    loc :
    Location

    }

    impl ToJson for FieldPat

    FnKind

    pub(all) enum FnKind {
    Lambda
    Matrix
    Arrow
    }

    impl ToJson for FnKind

    FunDecl

    pub(all) struct FunDecl {
    type_name : TypeName?
    name : Binder
    has_error :
    Location
    ?
    is_async : Bool
    decl_params :
    List
    [Parameter]?
    params_loc :
    Location

    quantifiers :
    List
    [TypeVarBinder]
    return_type : Type?
    error_type : ErrorType
    vis : Visibility
    attrs :
    List
    [Attribute]
    doc : DocString
    }

    impl ToJson for FunDecl

    FuncStubs

    pub(all) enum FuncStubs {
    Import(String, String)
    Embedded(String?, EmbeddedCode)
    }

    impl ToJson for FuncStubs

    Group

    pub(all) enum Group {
    Brace
    Paren
    }

    impl ToJson for Group

    Hole

    pub(all) enum Hole {
    Synthesized
    Incomplete
    Todo
    }

    impl ToJson for Hole

    Impl

    pub(all) enum Impl {
    TopExpr(Expr, Bool,
    List
    [LocalTypeDecl],
    Location
    )
    TopTest(Expr, (String,
    Location
    )?,
    List
    [Parameter]?,
    List
    [LocalTypeDecl],
    Location
    ,
    List
    [Attribute], DocString)
    TopTypeDef(TypeDecl)
    TopFuncDef(FunDecl, DeclBody,
    Location
    )
    TopFuncAlias(Label?, Label?,
    List
    [AliasTarget], Visibility,
    List
    [Attribute], Bool, DocString,
    Location
    )
    TopLetDef(Binder, Type?, Expr, Visibility, Bool,
    Location
    ,
    List
    [Attribute], DocString)
    TopTrait(TraitDecl)
    TopBatchTypeAlias(Label?,
    List
    [AliasTarget], Visibility,
    Location
    ,
    List
    [Attribute], Bool, DocString)
    TopBatchTraitAlias(Label?,
    List
    [AliasTarget], Visibility,
    Location
    ,
    List
    [Attribute], Bool, DocString)
    TopImpl(Type?, TypeName, Binder,
    Location
    ?,
    List
    [TypeVarBinder],
    List
    [Parameter], Type?, ErrorType, DeclBody, Visibility,
    Location
    ,
    List
    [Attribute], DocString)
    TopView(
    List
    [TypeVarBinder], Type, String,
    Location
    ,
    List
    [ConstrDecl], Binder,
    List
    [Parameter],
    Location
    , Expr, Visibility,
    Location
    ,
    List
    [Attribute], DocString)
    TopImplRelation(Type, TypeName,
    List
    [TypeVarBinder], Visibility,
    List
    [Attribute],
    Location
    , DocString)
    }

    impl ToJson for Impl

    InterpolationComponent

    pub(all) enum InterpolationComponent {
    InterpLit(String,
    Location
    )
    InterpSource(
    InterpSource
    )
    }

    Label

    pub(all) struct Label {
    name : String
    loc :
    Location

    }

    impl ToJson for Label

    LocalTypeDecl

    pub(all) struct LocalTypeDecl {
    tycon : String
    tycon_loc :
    Location

    components : TypeDesc
    deriving :
    List
    [DerivingDirective]
    }

    LongIdent

    pub(all) enum LongIdent {
    Ident(String)
    Dot(String, String)
    }

    impl ToJson for LongIdent

    LongIdent::dummy

    fn LongIdent::dummy() -> LongIdent
    The dummy LongIdent is used in typer to represent an parsing error.

    MapExprElem

    MapPatElem

    pub(all) struct MapPatElem {
    key : Constant
    pat : Pattern
    match_absent : Bool
    key_loc :
    Location

    loc :
    Location

    }

    MapVisitorBase

    pub(all) type MapVisitorBase[T] T

    MapVisitorBase::inner

    fn[T] MapVisitorBase::inner(self : MapVisitorBase[T]) -> T
    Convert newtype to its underlying type, automatically derived.

    MultiArgCase

    pub(all) struct MultiArgCase {
    patterns :
    List
    [Pattern]
    guard_ : Expr?
    body : Expr
    }

    MultilineStringElem

    pub(all) enum MultilineStringElem {
    String(String)
    Interp(
    List
    [InterpElem])
    }

    Parameter

    pub(all) enum Parameter {
    DiscardPositional(Type?,
    Location
    )
    Positional(Binder, Type?)
    Labelled(Binder, Type?)
    Optional(Binder, Expr, Type?)
    QuestionOptional(Binder, Type?)
    }

    impl ToJson for Parameter

    SpreadableElem

    pub(all) enum SpreadableElem {
    Regular(Expr)
    Spread(Expr,
    Location
    )
    }

    StaticAssertion

    pub(all) struct StaticAssertion {
    ty : Type
    trait_ : LongIdent
    loc :
    Location

    msg : String
    }

    TrailingMark

    pub(all) enum TrailingMark {
    Comma
    Semi
    None
    }

    TraitMethodDecl

    TryOperatorKind

    pub(all) enum TryOperatorKind {
    Question
    Exclamation
    }

    TypeDeclBinder

    pub(all) struct TypeDeclBinder {
    name : String?
    loc :
    Location

    }

    TypeDesc

    pub(all) enum TypeDesc {
    Abstract
    Extern
    Newtype(Type)
    Error(ExceptionDecl)
    Variant(
    List
    [ConstrDecl])
    Record(
    List
    [FieldDecl])
    TupleStruct(
    List
    [Type])
    Alias(Type)
    }

    impl ToJson for TypeDesc

    TypeName

    pub(all) struct TypeName {
    name : LongIdent
    is_object : Bool
    loc :
    Location

    }

    impl ToJson for TypeName

    TypeVarBinder

    pub(all) struct TypeVarBinder {
    name : String
    constraints :
    List
    [TypeVarConstraint]
    loc :
    Location

    }

    TypeVarConstraint

    pub(all) struct TypeVarConstraint {
    trait_ : LongIdent
    loc :
    Location

    }

    Var

    pub(all) struct Var {
    name : LongIdent
    loc :
    Location

    }

    impl ToJson for Var

    Visibility

    pub(all) enum Visibility {
    Default
    Pub(String?,
    Location
    )
    Priv(
    Location
    )
    }

    arrow_fn_param_to_expr

    fn arrow_fn_param_to_expr(p : ArrowFnParam) -> Expr
    Convert arrow function parameter to expression

    binder_to_expr

    fn binder_to_expr(p : Binder) -> Expr
    Convert binder to expression

    bracket_loc

    desugar_array_augmented_set

    fn desugar_array_augmented_set(loc :
    Location
    , op : Var, array : Expr, index : Expr, value : Expr) -> Expr
    Desugar augmented array assignment

    desugar_array_get

    fn desugar_array_get(loc~ :
    Location
    , obj : Expr, index : Expr) -> Expr
    Desugar array get operation to method call

    desugar_array_set

    fn desugar_array_set(loc~ :
    Location
    , obj : Expr, index : Expr, value : Expr) -> Expr
    Desugar array set operation to method call

    impls_to_json

    fn impls_to_json(impls :
    List
    [Impl]) -> Json

    label_to_expr

    fn label_to_expr(loc~ :
    Location
    , label : Label) -> Expr
    Convert label to expression

    label_to_pat

    fn label_to_pat(loc~ :
    Location
    , label : Label) -> Pattern
    Convert label to pattern

    loc_of_expression

    fn loc_of_expression(expr : Expr) ->
    Location

    make_alias_pattern

    fn make_alias_pattern(loc~ :
    Location
    , pat : Pattern, alias_ : Binder) -> Pattern
    Create alias pattern

    make_array_expr

    Create array expression with possible spread elements

    make_arrow_fn

    Create arrow function

    make_assign_opt

    fn make_assign_opt(loc~ :
    Location
    , lhs : Expr, rhs : Expr) -> Expr?
    Try to create assignment expression

    make_attribute

    fn make_attribute(loc~ :
    Location
    , id~ : String, dot_id~ : String?, raw_payload~ : String) -> Attribute

    make_augmented_assign_opt

    fn make_augmented_assign_opt(loc~ :
    Location
    , op : Var, lhs : Expr, rhs : Expr) -> Expr?
    Try to create augmented assignment expression

    make_constant_expr

    fn make_constant_expr(loc~ :
    Location
    , c : Constant) -> Expr
    Create constant expression with location

    make_constant_pattern

    fn make_constant_pattern(loc~ :
    Location
    , c : Constant) -> Pattern
    Create constant pattern

    make_constr_pattern

    fn make_constr_pattern(loc~ :
    Location
    , constr : Constructor, args :
    List
    [ConstrPatArg]?, is_open : Bool) -> Pattern
    Create constructor pattern

    make_double

    fn make_double(f : String) -> Constant
    Create double constant

    make_field_def

    fn make_field_def(loc~ :
    Location
    , label : Label, expr : Expr, is_pun : Bool) -> FieldDef
    Create field definition

    make_field_pat

    fn make_field_pat(loc~ :
    Location
    , label : Label, pattern : Pattern, is_pun : Bool) -> FieldPat
    Create field pattern

    make_float

    fn make_float(f : String) -> Constant
    Create float constant

    make_ident_expr

    fn make_ident_expr(loc~ :
    Location
    , id : Var) -> Expr
    Create identifier expression

    make_int

    fn make_int(i : String) -> Constant
    Parse integer literal with suffix

    make_interp_expr

    Create interpolation expression

    make_interps

    Create interpolation elements from literal components

    make_option_type

    Create option type

    make_record_expr

    fn make_record_expr(loc~ :
    Location
    , trailing~ : TrailingMark, type_name : TypeName?, fields :
    List
    [FieldDef]) -> Expr
    Create record expression

    make_tuple_expr

    Create tuple expression

    make_tuple_pattern

    Create tuple pattern

    make_tuple_type

    Create tuple type

    make_uminus

    fn make_uminus(loc~ :
    Location
    , name : String, arg : Expr) -> Expr
    Create unary minus expression

    make_unot

    Create logical not expression

    make_uplus

    fn make_uplus(loc~ :
    Location
    , name : String, arg : Expr) -> Expr
    Create unary plus expression