Module Refactor

Refactoring module

Functions

visit_stmts (callback) Visit statements

Fields

refactor Global refactoring state

Class RefactorState

RefactorState:run_command (name, args) Run a builtin refactoring command
RefactorState:transform (callback) Run a custom refactoring transformation

Class MatchCtxt

MatchCtxt:parse_stmts (pat) Parse statements and add them to this MatchCtxt
MatchCtxt:parse_expr (pat) Parse an expression and add it to this MatchCtxt
MatchCtxt:fold_with (needle, callback) Find matches of pattern and rewrite using callback
MatchCtxt:get_lit (pattern) Get matched binding for a literal variable
MatchCtxt:get_expr (pattern) Get matched binding for an expression variable
MatchCtxt:get_ty (pattern) Get matched binding for a type variable
MatchCtxt:get_stmt (pattern) Get matched binding for a statement variable
MatchCtxt:get_multistmt (pattern) Get matched binding for a multistmt variable
MatchCtxt:try_match (pat, target) Attempt to match target against pat, updating bindings if matched.
MatchCtxt:find_first (pat, target) Attempt to find pat inside target, updating bindings if matched.
MatchCtxt:subst (replacement) Substitute the currently matched AST node with a new AST node

Class TransformCtxt

TransformCtxt:replace_stmts_with (needle, callback) Replace matching statements using given callback
TransformCtxt:replace_expr_with (needle, haystack) Replace matching expressions using given replacements
TransformCtxt:replace_expr_with (needle, callback) Replace matching expressions using given callback
TransformCtxt:match (callback) Create a new, empty MatchCtxt
TransformCtxt:visit_crate (object) Visits an entire crate via a lua object's methods
TransformCtxt:visit_crate (object) Visits an entire crate via a lua object's methods
TransformCtxt:visit_fn_like (object) Visits every fn like via a lua object's methods
TransformCtxt:visit_paths (node, QSelf) Rewrite all paths in a crate
TransformCtxt:create_use (Tree) Create a new use item
TransformCtxt:get_node_type (node_id) Get the node type of the node with the given id

scripting.into_lua_ast Functions

Stmt AST Stmt
Expr AST Expr

Class Crate

Crate:get_module () Return the "module" field of the current node
Crate:set_module (value) Set the "module" field of the current node to a new value
Crate:get_attrs () Return the "attrs" field of the current node
Crate:set_attrs (value) Set the "attrs" field of the current node to a new value
Crate:get_span () Return the "span" field of the current node
Crate:set_span (value) Set the "span" field of the current node to a new value

Class Mod

Mod:get_inner () Return the "inner" field of the current node
Mod:set_inner (value) Set the "inner" field of the current node to a new value
Mod:get_items () Return the "items" field of the current node
Mod:set_items (value) Set the "items" field of the current node to a new value
Mod:get_inline () Return the "inline" field of the current node
Mod:set_inline (value) Set the "inline" field of the current node to a new value

Class Item

Item:get_ident () Return the "ident" field of the current node
Item:set_ident (value) Set the "ident" field of the current node to a new value
Item:get_attrs () Return the "attrs" field of the current node
Item:set_attrs (value) Set the "attrs" field of the current node to a new value
Item:get_id () Return the "id" field of the current node
Item:set_id (value) Set the "id" field of the current node to a new value
Item:get_kind () Return the "kind" field of the current node
Item:set_kind (value) Set the "kind" field of the current node to a new value
Item:get_vis () Return the "vis" field of the current node
Item:set_vis (value) Set the "vis" field of the current node to a new value
Item:get_span () Return the "span" field of the current node
Item:set_span (value) Set the "span" field of the current node to a new value
Item:get_tokens () Return the "tokens" field of the current node
Item:set_tokens (value) Set the "tokens" field of the current node to a new value
Item:kind_name () Return the kind of the current node as a string
Item:children () Return the children of the current node
Item:child (idx) Return a copy of the given child
Item:replace_child (idx, value) Replace a child of the current node with a new value

Class ItemKind

ItemKind:kind_name () Return the kind of the current node as a string
ItemKind:children () Return the children of the current node
ItemKind:child (idx) Return a copy of the given child
ItemKind:replace_child (idx, value) Replace a child of the current node with a new value

Class UseTreeKind

UseTreeKind:kind_name () Return the kind of the current node as a string
UseTreeKind:children () Return the children of the current node
UseTreeKind:child (idx) Return a copy of the given child
UseTreeKind:replace_child (idx, value) Replace a child of the current node with a new value

Class UseTree

UseTree:get_kind () Return the "kind" field of the current node
UseTree:set_kind (value) Set the "kind" field of the current node to a new value
UseTree:get_prefix () Return the "prefix" field of the current node
UseTree:set_prefix (value) Set the "prefix" field of the current node to a new value
UseTree:get_span () Return the "span" field of the current node
UseTree:set_span (value) Set the "span" field of the current node to a new value
UseTree:kind_name () Return the kind of the current node as a string
UseTree:children () Return the children of the current node
UseTree:child (idx) Return a copy of the given child
UseTree:replace_child (idx, value) Replace a child of the current node with a new value

Class TraitItem

TraitItem:get_id () Return the "id" field of the current node
TraitItem:set_id (value) Set the "id" field of the current node to a new value
TraitItem:get_ident () Return the "ident" field of the current node
TraitItem:set_ident (value) Set the "ident" field of the current node to a new value
TraitItem:get_attrs () Return the "attrs" field of the current node
TraitItem:set_attrs (value) Set the "attrs" field of the current node to a new value
TraitItem:get_generics () Return the "generics" field of the current node
TraitItem:set_generics (value) Set the "generics" field of the current node to a new value
TraitItem:get_kind () Return the "kind" field of the current node
TraitItem:set_kind (value) Set the "kind" field of the current node to a new value
TraitItem:get_span () Return the "span" field of the current node
TraitItem:set_span (value) Set the "span" field of the current node to a new value
TraitItem:get_tokens () Return the "tokens" field of the current node
TraitItem:set_tokens (value) Set the "tokens" field of the current node to a new value
TraitItem:kind_name () Return the kind of the current node as a string
TraitItem:children () Return the children of the current node
TraitItem:child (idx) Return a copy of the given child
TraitItem:replace_child (idx, value) Replace a child of the current node with a new value

Class TraitItemKind

TraitItemKind:kind_name () Return the kind of the current node as a string
TraitItemKind:children () Return the children of the current node
TraitItemKind:child (idx) Return a copy of the given child
TraitItemKind:replace_child (idx, value) Replace a child of the current node with a new value

Class ImplItem

ImplItem:get_id () Return the "id" field of the current node
ImplItem:set_id (value) Set the "id" field of the current node to a new value
ImplItem:get_ident () Return the "ident" field of the current node
ImplItem:set_ident (value) Set the "ident" field of the current node to a new value
ImplItem:get_vis () Return the "vis" field of the current node
ImplItem:set_vis (value) Set the "vis" field of the current node to a new value
ImplItem:get_defaultness () Return the "defaultness" field of the current node
ImplItem:set_defaultness (value) Set the "defaultness" field of the current node to a new value
ImplItem:get_attrs () Return the "attrs" field of the current node
ImplItem:set_attrs (value) Set the "attrs" field of the current node to a new value
ImplItem:get_generics () Return the "generics" field of the current node
ImplItem:set_generics (value) Set the "generics" field of the current node to a new value
ImplItem:get_kind () Return the "kind" field of the current node
ImplItem:set_kind (value) Set the "kind" field of the current node to a new value
ImplItem:get_span () Return the "span" field of the current node
ImplItem:set_span (value) Set the "span" field of the current node to a new value
ImplItem:get_tokens () Return the "tokens" field of the current node
ImplItem:set_tokens (value) Set the "tokens" field of the current node to a new value

Class ImplItemKind

ImplItemKind:kind_name () Return the kind of the current node as a string
ImplItemKind:children () Return the children of the current node
ImplItemKind:child (idx) Return a copy of the given child
ImplItemKind:replace_child (idx, value) Replace a child of the current node with a new value

Class TraitRef

TraitRef:get_path () Return the "path" field of the current node
TraitRef:set_path (value) Set the "path" field of the current node to a new value
TraitRef:get_ref_id () Return the "ref_id" field of the current node
TraitRef:set_ref_id (value) Set the "ref_id" field of the current node to a new value

Class EnumDef

EnumDef:get_variants () Return the "variants" field of the current node
EnumDef:set_variants (value) Set the "variants" field of the current node to a new value

Class Variant

Variant:get_ident () Return the "ident" field of the current node
Variant:set_ident (value) Set the "ident" field of the current node to a new value
Variant:get_attrs () Return the "attrs" field of the current node
Variant:set_attrs (value) Set the "attrs" field of the current node to a new value
Variant:get_id () Return the "id" field of the current node
Variant:set_id (value) Set the "id" field of the current node to a new value
Variant:get_data () Return the "data" field of the current node
Variant:set_data (value) Set the "data" field of the current node to a new value
Variant:get_disr_expr () Return the "disr_expr" field of the current node
Variant:set_disr_expr (value) Set the "disr_expr" field of the current node to a new value
Variant:get_span () Return the "span" field of the current node
Variant:set_span (value) Set the "span" field of the current node to a new value
Variant:get_is_placeholder () Return the "is_placeholder" field of the current node
Variant:set_is_placeholder (value) Set the "is_placeholder" field of the current node to a new value

Class VariantData

VariantData:kind_name () Return the kind of the current node as a string
VariantData:children () Return the children of the current node
VariantData:child (idx) Return a copy of the given child
VariantData:replace_child (idx, value) Replace a child of the current node with a new value

Class StructField

StructField:get_span () Return the "span" field of the current node
StructField:set_span (value) Set the "span" field of the current node to a new value
StructField:get_ident () Return the "ident" field of the current node
StructField:set_ident (value) Set the "ident" field of the current node to a new value
StructField:get_vis () Return the "vis" field of the current node
StructField:set_vis (value) Set the "vis" field of the current node to a new value
StructField:get_id () Return the "id" field of the current node
StructField:set_id (value) Set the "id" field of the current node to a new value
StructField:get_ty () Return the "ty" field of the current node
StructField:set_ty (value) Set the "ty" field of the current node to a new value
StructField:get_attrs () Return the "attrs" field of the current node
StructField:set_attrs (value) Set the "attrs" field of the current node to a new value
StructField:get_is_placeholder () Return the "is_placeholder" field of the current node
StructField:set_is_placeholder (value) Set the "is_placeholder" field of the current node to a new value

Class MethodSig

MethodSig:get_header () Return the "header" field of the current node
MethodSig:set_header (value) Set the "header" field of the current node to a new value
MethodSig:get_decl () Return the "decl" field of the current node
MethodSig:set_decl (value) Set the "decl" field of the current node to a new value

Class ForeignMod

ForeignMod:get_abi () Return the "abi" field of the current node
ForeignMod:set_abi (value) Set the "abi" field of the current node to a new value
ForeignMod:get_items () Return the "items" field of the current node
ForeignMod:set_items (value) Set the "items" field of the current node to a new value

Class ForeignItem

ForeignItem:get_ident () Return the "ident" field of the current node
ForeignItem:set_ident (value) Set the "ident" field of the current node to a new value
ForeignItem:get_attrs () Return the "attrs" field of the current node
ForeignItem:set_attrs (value) Set the "attrs" field of the current node to a new value
ForeignItem:get_kind () Return the "kind" field of the current node
ForeignItem:set_kind (value) Set the "kind" field of the current node to a new value
ForeignItem:get_id () Return the "id" field of the current node
ForeignItem:set_id (value) Set the "id" field of the current node to a new value
ForeignItem:get_span () Return the "span" field of the current node
ForeignItem:set_span (value) Set the "span" field of the current node to a new value
ForeignItem:get_vis () Return the "vis" field of the current node
ForeignItem:set_vis (value) Set the "vis" field of the current node to a new value
ForeignItem:kind_name () Return the kind of the current node as a string
ForeignItem:children () Return the children of the current node
ForeignItem:child (idx) Return a copy of the given child
ForeignItem:replace_child (idx, value) Replace a child of the current node with a new value

Class ForeignItemKind

ForeignItemKind:kind_name () Return the kind of the current node as a string
ForeignItemKind:children () Return the children of the current node
ForeignItemKind:child (idx) Return a copy of the given child
ForeignItemKind:replace_child (idx, value) Replace a child of the current node with a new value

Class Generics

Generics:get_params () Return the "params" field of the current node
Generics:set_params (value) Set the "params" field of the current node to a new value
Generics:get_where_clause () Return the "where_clause" field of the current node
Generics:set_where_clause (value) Set the "where_clause" field of the current node to a new value
Generics:get_span () Return the "span" field of the current node
Generics:set_span (value) Set the "span" field of the current node to a new value

Class GenericParam

GenericParam:get_id () Return the "id" field of the current node
GenericParam:set_id (value) Set the "id" field of the current node to a new value
GenericParam:get_ident () Return the "ident" field of the current node
GenericParam:set_ident (value) Set the "ident" field of the current node to a new value
GenericParam:get_attrs () Return the "attrs" field of the current node
GenericParam:set_attrs (value) Set the "attrs" field of the current node to a new value
GenericParam:get_bounds () Return the "bounds" field of the current node
GenericParam:set_bounds (value) Set the "bounds" field of the current node to a new value
GenericParam:get_kind () Return the "kind" field of the current node
GenericParam:set_kind (value) Set the "kind" field of the current node to a new value
GenericParam:get_is_placeholder () Return the "is_placeholder" field of the current node
GenericParam:set_is_placeholder (value) Set the "is_placeholder" field of the current node to a new value
GenericParam:kind_name () Return the kind of the current node as a string
GenericParam:children () Return the children of the current node
GenericParam:child (idx) Return a copy of the given child
GenericParam:replace_child (idx, value) Replace a child of the current node with a new value

Class GenericParamKind

GenericParamKind:kind_name () Return the kind of the current node as a string
GenericParamKind:children () Return the children of the current node
GenericParamKind:child (idx) Return a copy of the given child
GenericParamKind:replace_child (idx, value) Replace a child of the current node with a new value

Class WhereClause

WhereClause:get_predicates () Return the "predicates" field of the current node
WhereClause:set_predicates (value) Set the "predicates" field of the current node to a new value
WhereClause:get_span () Return the "span" field of the current node
WhereClause:set_span (value) Set the "span" field of the current node to a new value

Class WherePredicate

WherePredicate:kind_name () Return the kind of the current node as a string
WherePredicate:children () Return the children of the current node
WherePredicate:child (idx) Return a copy of the given child
WherePredicate:replace_child (idx, value) Replace a child of the current node with a new value

Class WhereBoundPredicate

WhereBoundPredicate:get_span () Return the "span" field of the current node
WhereBoundPredicate:set_span (value) Set the "span" field of the current node to a new value
WhereBoundPredicate:get_bounded_ty () Return the "bounded_ty" field of the current node
WhereBoundPredicate:set_bounded_ty (value) Set the "bounded_ty" field of the current node to a new value
WhereBoundPredicate:get_bounds () Return the "bounds" field of the current node
WhereBoundPredicate:set_bounds (value) Set the "bounds" field of the current node to a new value
WhereBoundPredicate:get_bound_generic_params () Return the "boundgenericparams" field of the current node
WhereBoundPredicate:set_bound_generic_params (value) Set the "boundgenericparams" field of the current node to a new value

Class WhereRegionPredicate

WhereRegionPredicate:get_span () Return the "span" field of the current node
WhereRegionPredicate:set_span (value) Set the "span" field of the current node to a new value
WhereRegionPredicate:get_lifetime () Return the "lifetime" field of the current node
WhereRegionPredicate:set_lifetime (value) Set the "lifetime" field of the current node to a new value
WhereRegionPredicate:get_bounds () Return the "bounds" field of the current node
WhereRegionPredicate:set_bounds (value) Set the "bounds" field of the current node to a new value

Class WhereEqPredicate

WhereEqPredicate:get_id () Return the "id" field of the current node
WhereEqPredicate:set_id (value) Set the "id" field of the current node to a new value
WhereEqPredicate:get_span () Return the "span" field of the current node
WhereEqPredicate:set_span (value) Set the "span" field of the current node to a new value
WhereEqPredicate:get_lhs_ty () Return the "lhs_ty" field of the current node
WhereEqPredicate:set_lhs_ty (value) Set the "lhs_ty" field of the current node to a new value
WhereEqPredicate:get_rhs_ty () Return the "rhs_ty" field of the current node
WhereEqPredicate:set_rhs_ty (value) Set the "rhs_ty" field of the current node to a new value

Class TraitBoundModifier

TraitBoundModifier:kind_name () Return the kind of the current node as a string
TraitBoundModifier:children () Return the children of the current node
TraitBoundModifier:child (idx) Return a copy of the given child
TraitBoundModifier:replace_child (idx, value) Replace a child of the current node with a new value

Class VisibilityKind

VisibilityKind:kind_name () Return the kind of the current node as a string
VisibilityKind:children () Return the children of the current node
VisibilityKind:child (idx) Return a copy of the given child
VisibilityKind:replace_child (idx, value) Replace a child of the current node with a new value

Class CrateSugar

CrateSugar:kind_name () Return the kind of the current node as a string
CrateSugar:children () Return the children of the current node
CrateSugar:child (idx) Return a copy of the given child
CrateSugar:replace_child (idx, value) Replace a child of the current node with a new value

Class Ty

Ty:get_id () Return the "id" field of the current node
Ty:set_id (value) Set the "id" field of the current node to a new value
Ty:get_kind () Return the "kind" field of the current node
Ty:set_kind (value) Set the "kind" field of the current node to a new value
Ty:get_span () Return the "span" field of the current node
Ty:set_span (value) Set the "span" field of the current node to a new value
Ty:kind_name () Return the kind of the current node as a string
Ty:children () Return the children of the current node
Ty:child (idx) Return a copy of the given child
Ty:replace_child (idx, value) Replace a child of the current node with a new value

Class MutTy

MutTy:get_ty () Return the "ty" field of the current node
MutTy:set_ty (value) Set the "ty" field of the current node to a new value
MutTy:get_mutbl () Return the "mutbl" field of the current node
MutTy:set_mutbl (value) Set the "mutbl" field of the current node to a new value

Class TyKind

TyKind:kind_name () Return the kind of the current node as a string
TyKind:children () Return the children of the current node
TyKind:child (idx) Return a copy of the given child
TyKind:replace_child (idx, value) Replace a child of the current node with a new value

Class TraitObjectSyntax

TraitObjectSyntax:kind_name () Return the kind of the current node as a string
TraitObjectSyntax:children () Return the children of the current node
TraitObjectSyntax:child (idx) Return a copy of the given child
TraitObjectSyntax:replace_child (idx, value) Replace a child of the current node with a new value

Class LitIntType

LitIntType:kind_name () Return the kind of the current node as a string
LitIntType:children () Return the children of the current node
LitIntType:child (idx) Return a copy of the given child
LitIntType:replace_child (idx, value) Replace a child of the current node with a new value

Class IntTy

IntTy:kind_name () Return the kind of the current node as a string
IntTy:children () Return the children of the current node
IntTy:child (idx) Return a copy of the given child
IntTy:replace_child (idx, value) Replace a child of the current node with a new value

Class UintTy

UintTy:kind_name () Return the kind of the current node as a string
UintTy:children () Return the children of the current node
UintTy:child (idx) Return a copy of the given child
UintTy:replace_child (idx, value) Replace a child of the current node with a new value

Class FloatTy

FloatTy:kind_name () Return the kind of the current node as a string
FloatTy:children () Return the children of the current node
FloatTy:child (idx) Return a copy of the given child
FloatTy:replace_child (idx, value) Replace a child of the current node with a new value

Class BareFnTy

BareFnTy:get_unsafety () Return the "unsafety" field of the current node
BareFnTy:set_unsafety (value) Set the "unsafety" field of the current node to a new value
BareFnTy:get_abi () Return the "abi" field of the current node
BareFnTy:set_abi (value) Set the "abi" field of the current node to a new value
BareFnTy:get_decl () Return the "decl" field of the current node
BareFnTy:set_decl (value) Set the "decl" field of the current node to a new value
BareFnTy:get_generic_params () Return the "generic_params" field of the current node
BareFnTy:set_generic_params (value) Set the "generic_params" field of the current node to a new value

Class Lifetime

Lifetime:get_id () Return the "id" field of the current node
Lifetime:set_id (value) Set the "id" field of the current node to a new value
Lifetime:get_ident () Return the "ident" field of the current node
Lifetime:set_ident (value) Set the "ident" field of the current node to a new value

Class GenericBound

GenericBound:kind_name () Return the kind of the current node as a string
GenericBound:children () Return the children of the current node
GenericBound:child (idx) Return a copy of the given child
GenericBound:replace_child (idx, value) Replace a child of the current node with a new value

Class PolyTraitRef

PolyTraitRef:get_trait_ref () Return the "trait_ref" field of the current node
PolyTraitRef:set_trait_ref (value) Set the "trait_ref" field of the current node to a new value
PolyTraitRef:get_span () Return the "span" field of the current node
PolyTraitRef:set_span (value) Set the "span" field of the current node to a new value
PolyTraitRef:get_bound_generic_params () Return the "boundgenericparams" field of the current node
PolyTraitRef:set_bound_generic_params (value) Set the "boundgenericparams" field of the current node to a new value

Class FnDecl

FnDecl:get_inputs () Return the "inputs" field of the current node
FnDecl:set_inputs (value) Set the "inputs" field of the current node to a new value
FnDecl:get_output () Return the "output" field of the current node
FnDecl:set_output (value) Set the "output" field of the current node to a new value

Class FnHeader

FnHeader:get_unsafety () Return the "unsafety" field of the current node
FnHeader:set_unsafety (value) Set the "unsafety" field of the current node to a new value
FnHeader:get_asyncness () Return the "asyncness" field of the current node
FnHeader:set_asyncness (value) Set the "asyncness" field of the current node to a new value
FnHeader:get_constness () Return the "constness" field of the current node
FnHeader:set_constness (value) Set the "constness" field of the current node to a new value
FnHeader:get_abi () Return the "abi" field of the current node
FnHeader:set_abi (value) Set the "abi" field of the current node to a new value

Class Param

Param:get_attrs () Return the "attrs" field of the current node
Param:set_attrs (value) Set the "attrs" field of the current node to a new value
Param:get_ty () Return the "ty" field of the current node
Param:set_ty (value) Set the "ty" field of the current node to a new value
Param:get_pat () Return the "pat" field of the current node
Param:set_pat (value) Set the "pat" field of the current node to a new value
Param:get_id () Return the "id" field of the current node
Param:set_id (value) Set the "id" field of the current node to a new value
Param:get_span () Return the "span" field of the current node
Param:set_span (value) Set the "span" field of the current node to a new value
Param:get_is_placeholder () Return the "is_placeholder" field of the current node
Param:set_is_placeholder (value) Set the "is_placeholder" field of the current node to a new value

Class FunctionRetTy

FunctionRetTy:kind_name () Return the kind of the current node as a string
FunctionRetTy:children () Return the children of the current node
FunctionRetTy:child (idx) Return a copy of the given child
FunctionRetTy:replace_child (idx, value) Replace a child of the current node with a new value

Class Stmt

Stmt:get_id () Return the "id" field of the current node
Stmt:set_id (value) Set the "id" field of the current node to a new value
Stmt:get_kind () Return the "kind" field of the current node
Stmt:set_kind (value) Set the "kind" field of the current node to a new value
Stmt:get_span () Return the "span" field of the current node
Stmt:set_span (value) Set the "span" field of the current node to a new value
Stmt:kind_name () Return the kind of the current node as a string
Stmt:children () Return the children of the current node
Stmt:child (idx) Return a copy of the given child
Stmt:replace_child (idx, value) Replace a child of the current node with a new value

Class StmtKind

StmtKind:kind_name () Return the kind of the current node as a string
StmtKind:children () Return the children of the current node
StmtKind:child (idx) Return a copy of the given child
StmtKind:replace_child (idx, value) Replace a child of the current node with a new value

Class Local

Local:get_pat () Return the "pat" field of the current node
Local:set_pat (value) Set the "pat" field of the current node to a new value
Local:get_ty () Return the "ty" field of the current node
Local:set_ty (value) Set the "ty" field of the current node to a new value
Local:get_init () Return the "init" field of the current node
Local:set_init (value) Set the "init" field of the current node to a new value
Local:get_id () Return the "id" field of the current node
Local:set_id (value) Set the "id" field of the current node to a new value
Local:get_span () Return the "span" field of the current node
Local:set_span (value) Set the "span" field of the current node to a new value
Local:get_attrs () Return the "attrs" field of the current node
Local:set_attrs (value) Set the "attrs" field of the current node to a new value

Class Expr

Expr:get_id () Return the "id" field of the current node
Expr:set_id (value) Set the "id" field of the current node to a new value
Expr:get_kind () Return the "kind" field of the current node
Expr:set_kind (value) Set the "kind" field of the current node to a new value
Expr:get_span () Return the "span" field of the current node
Expr:set_span (value) Set the "span" field of the current node to a new value
Expr:get_attrs () Return the "attrs" field of the current node
Expr:set_attrs (value) Set the "attrs" field of the current node to a new value
Expr:kind_name () Return the kind of the current node as a string
Expr:children () Return the children of the current node
Expr:child (idx) Return a copy of the given child
Expr:replace_child (idx, value) Replace a child of the current node with a new value

Class ExprKind

ExprKind:kind_name () Return the kind of the current node as a string
ExprKind:children () Return the children of the current node
ExprKind:child (idx) Return a copy of the given child
ExprKind:replace_child (idx, value) Replace a child of the current node with a new value

Class IsAsync

IsAsync:kind_name () Return the kind of the current node as a string
IsAsync:children () Return the children of the current node
IsAsync:child (idx) Return a copy of the given child
IsAsync:replace_child (idx, value) Replace a child of the current node with a new value

Class Movability

Movability:kind_name () Return the kind of the current node as a string
Movability:children () Return the children of the current node
Movability:child (idx) Return a copy of the given child
Movability:replace_child (idx, value) Replace a child of the current node with a new value

Class UnOp

UnOp:kind_name () Return the kind of the current node as a string
UnOp:children () Return the children of the current node
UnOp:child (idx) Return a copy of the given child
UnOp:replace_child (idx, value) Replace a child of the current node with a new value

Class BinOpKind

BinOpKind:kind_name () Return the kind of the current node as a string
BinOpKind:children () Return the children of the current node
BinOpKind:child (idx) Return a copy of the given child
BinOpKind:replace_child (idx, value) Replace a child of the current node with a new value

Class Field

Field:get_id () Return the "id" field of the current node
Field:set_id (value) Set the "id" field of the current node to a new value
Field:get_ident () Return the "ident" field of the current node
Field:set_ident (value) Set the "ident" field of the current node to a new value
Field:get_expr () Return the "expr" field of the current node
Field:set_expr (value) Set the "expr" field of the current node to a new value
Field:get_span () Return the "span" field of the current node
Field:set_span (value) Set the "span" field of the current node to a new value
Field:get_is_shorthand () Return the "is_shorthand" field of the current node
Field:set_is_shorthand (value) Set the "is_shorthand" field of the current node to a new value
Field:get_attrs () Return the "attrs" field of the current node
Field:set_attrs (value) Set the "attrs" field of the current node to a new value
Field:get_is_placeholder () Return the "is_placeholder" field of the current node
Field:set_is_placeholder (value) Set the "is_placeholder" field of the current node to a new value

Class Arm

Arm:get_id () Return the "id" field of the current node
Arm:set_id (value) Set the "id" field of the current node to a new value
Arm:get_attrs () Return the "attrs" field of the current node
Arm:set_attrs (value) Set the "attrs" field of the current node to a new value
Arm:get_pat () Return the "pat" field of the current node
Arm:set_pat (value) Set the "pat" field of the current node to a new value
Arm:get_guard () Return the "guard" field of the current node
Arm:set_guard (value) Set the "guard" field of the current node to a new value
Arm:get_body () Return the "body" field of the current node
Arm:set_body (value) Set the "body" field of the current node to a new value
Arm:get_span () Return the "span" field of the current node
Arm:set_span (value) Set the "span" field of the current node to a new value
Arm:get_is_placeholder () Return the "is_placeholder" field of the current node
Arm:set_is_placeholder (value) Set the "is_placeholder" field of the current node to a new value

Class Block

Block:get_stmts () Return the "stmts" field of the current node
Block:set_stmts (value) Set the "stmts" field of the current node to a new value
Block:get_id () Return the "id" field of the current node
Block:set_id (value) Set the "id" field of the current node to a new value
Block:get_rules () Return the "rules" field of the current node
Block:set_rules (value) Set the "rules" field of the current node to a new value
Block:get_span () Return the "span" field of the current node
Block:set_span (value) Set the "span" field of the current node to a new value

Class Pat

Pat:get_id () Return the "id" field of the current node
Pat:set_id (value) Set the "id" field of the current node to a new value
Pat:get_kind () Return the "kind" field of the current node
Pat:set_kind (value) Set the "kind" field of the current node to a new value
Pat:get_span () Return the "span" field of the current node
Pat:set_span (value) Set the "span" field of the current node to a new value
Pat:kind_name () Return the kind of the current node as a string
Pat:children () Return the children of the current node
Pat:child (idx) Return a copy of the given child
Pat:replace_child (idx, value) Replace a child of the current node with a new value

Class PatKind

PatKind:kind_name () Return the kind of the current node as a string
PatKind:children () Return the children of the current node
PatKind:child (idx) Return a copy of the given child
PatKind:replace_child (idx, value) Replace a child of the current node with a new value

Class FieldPat

FieldPat:get_id () Return the "id" field of the current node
FieldPat:set_id (value) Set the "id" field of the current node to a new value
FieldPat:get_ident () Return the "ident" field of the current node
FieldPat:set_ident (value) Set the "ident" field of the current node to a new value
FieldPat:get_pat () Return the "pat" field of the current node
FieldPat:set_pat (value) Set the "pat" field of the current node to a new value
FieldPat:get_is_shorthand () Return the "is_shorthand" field of the current node
FieldPat:set_is_shorthand (value) Set the "is_shorthand" field of the current node to a new value
FieldPat:get_attrs () Return the "attrs" field of the current node
FieldPat:set_attrs (value) Set the "attrs" field of the current node to a new value
FieldPat:get_span () Return the "span" field of the current node
FieldPat:set_span (value) Set the "span" field of the current node to a new value
FieldPat:get_is_placeholder () Return the "is_placeholder" field of the current node
FieldPat:set_is_placeholder (value) Set the "is_placeholder" field of the current node to a new value

Class Lit

Lit:get_token () Return the "token" field of the current node
Lit:set_token (value) Set the "token" field of the current node to a new value
Lit:get_kind () Return the "kind" field of the current node
Lit:set_kind (value) Set the "kind" field of the current node to a new value
Lit:get_span () Return the "span" field of the current node
Lit:set_span (value) Set the "span" field of the current node to a new value
Lit:kind_name () Return the kind of the current node as a string
Lit:children () Return the children of the current node
Lit:child (idx) Return a copy of the given child
Lit:replace_child (idx, value) Replace a child of the current node with a new value

Class LitKind

LitKind:kind_name () Return the kind of the current node as a string
LitKind:children () Return the children of the current node
LitKind:child (idx) Return a copy of the given child
LitKind:replace_child (idx, value) Replace a child of the current node with a new value

Class TokenLit

TokenLit:get_kind () Return the "kind" field of the current node
TokenLit:set_kind (value) Set the "kind" field of the current node to a new value
TokenLit:get_symbol () Return the "symbol" field of the current node
TokenLit:set_symbol (value) Set the "symbol" field of the current node to a new value
TokenLit:get_suffix () Return the "suffix" field of the current node
TokenLit:set_suffix (value) Set the "suffix" field of the current node to a new value
TokenLit:kind_name () Return the kind of the current node as a string
TokenLit:children () Return the children of the current node
TokenLit:child (idx) Return a copy of the given child
TokenLit:replace_child (idx, value) Replace a child of the current node with a new value

Class TokenLitKind

TokenLitKind:kind_name () Return the kind of the current node as a string
TokenLitKind:children () Return the children of the current node
TokenLitKind:child (idx) Return a copy of the given child
TokenLitKind:replace_child (idx, value) Replace a child of the current node with a new value

Class Defaultness

Defaultness:kind_name () Return the kind of the current node as a string
Defaultness:children () Return the children of the current node
Defaultness:child (idx) Return a copy of the given child
Defaultness:replace_child (idx, value) Replace a child of the current node with a new value

Class Constness

Constness:kind_name () Return the kind of the current node as a string
Constness:children () Return the children of the current node
Constness:child (idx) Return a copy of the given child
Constness:replace_child (idx, value) Replace a child of the current node with a new value

Class ImplPolarity

ImplPolarity:kind_name () Return the kind of the current node as a string
ImplPolarity:children () Return the children of the current node
ImplPolarity:child (idx) Return a copy of the given child
ImplPolarity:replace_child (idx, value) Replace a child of the current node with a new value

Class IsAuto

IsAuto:kind_name () Return the kind of the current node as a string
IsAuto:children () Return the children of the current node
IsAuto:child (idx) Return a copy of the given child
IsAuto:replace_child (idx, value) Replace a child of the current node with a new value

Class Unsafety

Unsafety:kind_name () Return the kind of the current node as a string
Unsafety:children () Return the children of the current node
Unsafety:child (idx) Return a copy of the given child
Unsafety:replace_child (idx, value) Replace a child of the current node with a new value

Class Mutability

Mutability:kind_name () Return the kind of the current node as a string
Mutability:children () Return the children of the current node
Mutability:child (idx) Return a copy of the given child
Mutability:replace_child (idx, value) Replace a child of the current node with a new value

Class RangeEnd

RangeEnd:kind_name () Return the kind of the current node as a string
RangeEnd:children () Return the children of the current node
RangeEnd:child (idx) Return a copy of the given child
RangeEnd:replace_child (idx, value) Replace a child of the current node with a new value

Class RangeSyntax

RangeSyntax:kind_name () Return the kind of the current node as a string
RangeSyntax:children () Return the children of the current node
RangeSyntax:child (idx) Return a copy of the given child
RangeSyntax:replace_child (idx, value) Replace a child of the current node with a new value

Class BindingMode

BindingMode:kind_name () Return the kind of the current node as a string
BindingMode:children () Return the children of the current node
BindingMode:child (idx) Return a copy of the given child
BindingMode:replace_child (idx, value) Replace a child of the current node with a new value

Class CaptureBy

CaptureBy:kind_name () Return the kind of the current node as a string
CaptureBy:children () Return the children of the current node
CaptureBy:child (idx) Return a copy of the given child
CaptureBy:replace_child (idx, value) Replace a child of the current node with a new value

Class BlockCheckMode

BlockCheckMode:kind_name () Return the kind of the current node as a string
BlockCheckMode:children () Return the children of the current node
BlockCheckMode:child (idx) Return a copy of the given child
BlockCheckMode:replace_child (idx, value) Replace a child of the current node with a new value

Class UnsafeSource

UnsafeSource:kind_name () Return the kind of the current node as a string
UnsafeSource:children () Return the children of the current node
UnsafeSource:child (idx) Return a copy of the given child
UnsafeSource:replace_child (idx, value) Replace a child of the current node with a new value

Class StrStyle

StrStyle:kind_name () Return the kind of the current node as a string
StrStyle:children () Return the children of the current node
StrStyle:child (idx) Return a copy of the given child
StrStyle:replace_child (idx, value) Replace a child of the current node with a new value

Class AsmDialect

AsmDialect:kind_name () Return the kind of the current node as a string
AsmDialect:children () Return the children of the current node
AsmDialect:child (idx) Return a copy of the given child
AsmDialect:replace_child (idx, value) Replace a child of the current node with a new value

Class RangeLimits

RangeLimits:kind_name () Return the kind of the current node as a string
RangeLimits:children () Return the children of the current node
RangeLimits:child (idx) Return a copy of the given child
RangeLimits:replace_child (idx, value) Replace a child of the current node with a new value

Class Attribute

Attribute:get_id () Return the "id" field of the current node
Attribute:set_id (value) Set the "id" field of the current node to a new value
Attribute:get_style () Return the "style" field of the current node
Attribute:set_style (value) Set the "style" field of the current node to a new value
Attribute:get_item () Return the "item" field of the current node
Attribute:set_item (value) Set the "item" field of the current node to a new value
Attribute:get_is_sugared_doc () Return the "issugareddoc" field of the current node
Attribute:set_is_sugared_doc (value) Set the "issugareddoc" field of the current node to a new value
Attribute:get_span () Return the "span" field of the current node
Attribute:set_span (value) Set the "span" field of the current node to a new value

Class AttrItem

AttrItem:get_path () Return the "path" field of the current node
AttrItem:set_path (value) Set the "path" field of the current node to a new value
AttrItem:get_tokens () Return the "tokens" field of the current node
AttrItem:set_tokens (value) Set the "tokens" field of the current node to a new value

Class AttrStyle

AttrStyle:kind_name () Return the kind of the current node as a string
AttrStyle:children () Return the children of the current node
AttrStyle:child (idx) Return a copy of the given child
AttrStyle:replace_child (idx, value) Replace a child of the current node with a new value

Class Path

Path:get_span () Return the "span" field of the current node
Path:set_span (value) Set the "span" field of the current node to a new value
Path:get_segments () Return the "segments" field of the current node
Path:set_segments (value) Set the "segments" field of the current node to a new value

Class PathSegment

PathSegment:get_ident () Return the "ident" field of the current node
PathSegment:set_ident (value) Set the "ident" field of the current node to a new value
PathSegment:get_id () Return the "id" field of the current node
PathSegment:set_id (value) Set the "id" field of the current node to a new value
PathSegment:get_args () Return the "args" field of the current node
PathSegment:set_args (value) Set the "args" field of the current node to a new value

Class GenericArgs

GenericArgs:kind_name () Return the kind of the current node as a string
GenericArgs:children () Return the children of the current node
GenericArgs:child (idx) Return a copy of the given child
GenericArgs:replace_child (idx, value) Replace a child of the current node with a new value

Class AngleBracketedArgs

AngleBracketedArgs:get_span () Return the "span" field of the current node
AngleBracketedArgs:set_span (value) Set the "span" field of the current node to a new value
AngleBracketedArgs:get_args () Return the "args" field of the current node
AngleBracketedArgs:set_args (value) Set the "args" field of the current node to a new value
AngleBracketedArgs:get_constraints () Return the "constraints" field of the current node
AngleBracketedArgs:set_constraints (value) Set the "constraints" field of the current node to a new value

Class ParenthesizedArgs

ParenthesizedArgs:get_span () Return the "span" field of the current node
ParenthesizedArgs:set_span (value) Set the "span" field of the current node to a new value
ParenthesizedArgs:get_inputs () Return the "inputs" field of the current node
ParenthesizedArgs:set_inputs (value) Set the "inputs" field of the current node to a new value
ParenthesizedArgs:get_output () Return the "output" field of the current node
ParenthesizedArgs:set_output (value) Set the "output" field of the current node to a new value

Class GenericArg

GenericArg:kind_name () Return the kind of the current node as a string
GenericArg:children () Return the children of the current node
GenericArg:child (idx) Return a copy of the given child
GenericArg:replace_child (idx, value) Replace a child of the current node with a new value

Class QSelf

QSelf:get_ty () Return the "ty" field of the current node
QSelf:set_ty (value) Set the "ty" field of the current node to a new value
QSelf:get_path_span () Return the "path_span" field of the current node
QSelf:set_path_span (value) Set the "path_span" field of the current node to a new value
QSelf:get_position () Return the "position" field of the current node
QSelf:set_position (value) Set the "position" field of the current node to a new value

Class AssocTyConstraint

AssocTyConstraint:get_id () Return the "id" field of the current node
AssocTyConstraint:set_id (value) Set the "id" field of the current node to a new value
AssocTyConstraint:get_ident () Return the "ident" field of the current node
AssocTyConstraint:set_ident (value) Set the "ident" field of the current node to a new value
AssocTyConstraint:get_kind () Return the "kind" field of the current node
AssocTyConstraint:set_kind (value) Set the "kind" field of the current node to a new value
AssocTyConstraint:get_span () Return the "span" field of the current node
AssocTyConstraint:set_span (value) Set the "span" field of the current node to a new value

Class AssocTyConstraintKind

AssocTyConstraintKind:kind_name () Return the kind of the current node as a string
AssocTyConstraintKind:children () Return the children of the current node
AssocTyConstraintKind:child (idx) Return a copy of the given child
AssocTyConstraintKind:replace_child (idx, value) Replace a child of the current node with a new value

Class Mac

Mac:get_path () Return the "path" field of the current node
Mac:set_path (value) Set the "path" field of the current node to a new value
Mac:get_delim () Return the "delim" field of the current node
Mac:set_delim (value) Set the "delim" field of the current node to a new value
Mac:get_tts () Return the "tts" field of the current node
Mac:set_tts (value) Set the "tts" field of the current node to a new value
Mac:get_span () Return the "span" field of the current node
Mac:set_span (value) Set the "span" field of the current node to a new value
Mac:get_prior_type_ascription () Return the "priortypeascription" field of the current node
Mac:set_prior_type_ascription (value) Set the "priortypeascription" field of the current node to a new value

Class MacStmtStyle

MacStmtStyle:kind_name () Return the kind of the current node as a string
MacStmtStyle:children () Return the children of the current node
MacStmtStyle:child (idx) Return a copy of the given child
MacStmtStyle:replace_child (idx, value) Replace a child of the current node with a new value

Class MacroDef

MacroDef:get_tokens () Return the "tokens" field of the current node
MacroDef:set_tokens (value) Set the "tokens" field of the current node to a new value
MacroDef:get_legacy () Return the "legacy" field of the current node
MacroDef:set_legacy (value) Set the "legacy" field of the current node to a new value

Class InlineAsm

InlineAsm:get_asm () Return the "asm" field of the current node
InlineAsm:set_asm (value) Set the "asm" field of the current node to a new value
InlineAsm:get_asm_str_style () Return the "asmstrstyle" field of the current node
InlineAsm:set_asm_str_style (value) Set the "asmstrstyle" field of the current node to a new value
InlineAsm:get_outputs () Return the "outputs" field of the current node
InlineAsm:set_outputs (value) Set the "outputs" field of the current node to a new value
InlineAsm:get_inputs () Return the "inputs" field of the current node
InlineAsm:set_inputs (value) Set the "inputs" field of the current node to a new value
InlineAsm:get_clobbers () Return the "clobbers" field of the current node
InlineAsm:set_clobbers (value) Set the "clobbers" field of the current node to a new value
InlineAsm:get_volatile () Return the "volatile" field of the current node
InlineAsm:set_volatile (value) Set the "volatile" field of the current node to a new value
InlineAsm:get_alignstack () Return the "alignstack" field of the current node
InlineAsm:set_alignstack (value) Set the "alignstack" field of the current node to a new value
InlineAsm:get_dialect () Return the "dialect" field of the current node
InlineAsm:set_dialect (value) Set the "dialect" field of the current node to a new value

Class GlobalAsm

GlobalAsm:get_asm () Return the "asm" field of the current node
GlobalAsm:set_asm (value) Set the "asm" field of the current node to a new value

Class InlineAsmOutput

InlineAsmOutput:get_constraint () Return the "constraint" field of the current node
InlineAsmOutput:set_constraint (value) Set the "constraint" field of the current node to a new value
InlineAsmOutput:get_expr () Return the "expr" field of the current node
InlineAsmOutput:set_expr (value) Set the "expr" field of the current node to a new value
InlineAsmOutput:get_is_rw () Return the "is_rw" field of the current node
InlineAsmOutput:set_is_rw (value) Set the "is_rw" field of the current node to a new value
InlineAsmOutput:get_is_indirect () Return the "is_indirect" field of the current node
InlineAsmOutput:set_is_indirect (value) Set the "is_indirect" field of the current node to a new value

Class Label

Label:get_ident () Return the "ident" field of the current node
Label:set_ident (value) Set the "ident" field of the current node to a new value

Class MacDelimiter

MacDelimiter:kind_name () Return the kind of the current node as a string
MacDelimiter:children () Return the children of the current node
MacDelimiter:child (idx) Return a copy of the given child
MacDelimiter:replace_child (idx, value) Replace a child of the current node with a new value

Class AnonConst

AnonConst:get_id () Return the "id" field of the current node
AnonConst:set_id (value) Set the "id" field of the current node to a new value
AnonConst:get_value () Return the "value" field of the current node
AnonConst:set_value (value) Set the "value" field of the current node to a new value

Class Ident

Ident:get_name () Return the "name" field of the current node
Ident:set_name (value) Set the "name" field of the current node to a new value
Ident:get_span () Return the "span" field of the current node
Ident:set_span (value) Set the "span" field of the current node to a new value

Class Nonterminal

Nonterminal:kind_name () Return the kind of the current node as a string
Nonterminal:children () Return the children of the current node
Nonterminal:child (idx) Return a copy of the given child
Nonterminal:replace_child (idx, value) Replace a child of the current node with a new value

Class TokenTree

TokenTree:kind_name () Return the kind of the current node as a string
TokenTree:children () Return the children of the current node
TokenTree:child (idx) Return a copy of the given child
TokenTree:replace_child (idx, value) Replace a child of the current node with a new value

Class DelimSpan

DelimSpan:get_open () Return the "open" field of the current node
DelimSpan:set_open (value) Set the "open" field of the current node to a new value
DelimSpan:get_close () Return the "close" field of the current node
DelimSpan:set_close (value) Set the "close" field of the current node to a new value

Class DelimToken

DelimToken:kind_name () Return the kind of the current node as a string
DelimToken:children () Return the children of the current node
DelimToken:child (idx) Return a copy of the given child
DelimToken:replace_child (idx, value) Replace a child of the current node with a new value

Class Token

Token:get_kind () Return the "kind" field of the current node
Token:set_kind (value) Set the "kind" field of the current node to a new value
Token:get_span () Return the "span" field of the current node
Token:set_span (value) Set the "span" field of the current node to a new value
Token:kind_name () Return the kind of the current node as a string
Token:children () Return the children of the current node
Token:child (idx) Return a copy of the given child
Token:replace_child (idx, value) Replace a child of the current node with a new value

Class TokenKind

TokenKind:kind_name () Return the kind of the current node as a string
TokenKind:children () Return the children of the current node
TokenKind:child (idx) Return a copy of the given child
TokenKind:replace_child (idx, value) Replace a child of the current node with a new value

Class BinOpToken

BinOpToken:kind_name () Return the kind of the current node as a string
BinOpToken:children () Return the children of the current node
BinOpToken:child (idx) Return a copy of the given child
BinOpToken:replace_child (idx, value) Replace a child of the current node with a new value

Class MetaItem

MetaItem:get_path () Return the "path" field of the current node
MetaItem:set_path (value) Set the "path" field of the current node to a new value
MetaItem:get_kind () Return the "kind" field of the current node
MetaItem:set_kind (value) Set the "kind" field of the current node to a new value
MetaItem:get_span () Return the "span" field of the current node
MetaItem:set_span (value) Set the "span" field of the current node to a new value
MetaItem:kind_name () Return the kind of the current node as a string
MetaItem:children () Return the children of the current node
MetaItem:child (idx) Return a copy of the given child
MetaItem:replace_child (idx, value) Replace a child of the current node with a new value

Class MetaItemKind

MetaItemKind:kind_name () Return the kind of the current node as a string
MetaItemKind:children () Return the children of the current node
MetaItemKind:child (idx) Return a copy of the given child
MetaItemKind:replace_child (idx, value) Replace a child of the current node with a new value

Class NestedMetaItem

NestedMetaItem:kind_name () Return the kind of the current node as a string
NestedMetaItem:children () Return the children of the current node
NestedMetaItem:child (idx) Return a copy of the given child
NestedMetaItem:replace_child (idx, value) Replace a child of the current node with a new value

Class LuaTy

LuaTy:kind_name () Return the kind of this type


Functions

visit_stmts (callback)
Visit statements

Parameters:

  • callback function(LuaAstNode) Function to call when visiting each statement

Fields

refactor
Global refactoring state
  • refactor RefactorState object

Class RefactorState

Refactoring context
RefactorState:run_command (name, args)
Run a builtin refactoring command

Parameters:

RefactorState:transform (callback)
Run a custom refactoring transformation

Parameters:

  • callback function(TransformCtxt) Transformation function called with a fresh TransformCtxt. This TransformCtxt can operate on the crate to implement transformations.

Class MatchCtxt

A match context
MatchCtxt:parse_stmts (pat)
Parse statements and add them to this MatchCtxt

Parameters:

Returns:

    LuaAstNode The parsed statements
MatchCtxt:parse_expr (pat)
Parse an expression and add it to this MatchCtxt

Parameters:

Returns:

    LuaAstNode The parsed expression
MatchCtxt:fold_with (needle, callback)
Find matches of pattern and rewrite using callback

Parameters:

  • needle LuaAstNode Pattern to search for
  • callback function(LuaAstNode,MatchCtxt) Function called for each match. Takes the matching node and a new MatchCtxt for that match.
MatchCtxt:get_lit (pattern)
Get matched binding for a literal variable

Parameters:

  • pattern string Literal variable pattern

Returns:

    LuaAstNode Literal matched by this binding
MatchCtxt:get_expr (pattern)
Get matched binding for an expression variable

Parameters:

  • pattern string Expression variable pattern

Returns:

    LuaAstNode Expression matched by this binding
MatchCtxt:get_ty (pattern)
Get matched binding for a type variable

Parameters:

  • pattern string Type variable pattern

Returns:

    LuaAstNode Type matched by this binding
MatchCtxt:get_stmt (pattern)
Get matched binding for a statement variable

Parameters:

  • pattern string Statement variable pattern

Returns:

    LuaAstNode Statement matched by this binding
MatchCtxt:get_multistmt (pattern)
Get matched binding for a multistmt variable

Parameters:

  • pattern string Statement variable pattern

Returns:

    LuaAstNode Statement matched by this binding
MatchCtxt:try_match (pat, target)
Attempt to match target against pat, updating bindings if matched.

Parameters:

  • pat LuaAstNode AST (potentially with variable bindings) to match with
  • target LuaAstNode AST to match against

Returns:

    bool true if match was successful
MatchCtxt:find_first (pat, target)
Attempt to find pat inside target, updating bindings if matched.

Parameters:

  • pat LuaAstNode AST (potentially with variable bindings) to find
  • target LuaAstNode AST to match inside

Returns:

    bool true if target was found
MatchCtxt:subst (replacement)
Substitute the currently matched AST node with a new AST node

Parameters:

  • replacement LuaAstNode New AST node to replace the currently matched AST. May include variable bindings if these bindings were matched by the search pattern.

Returns:

    LuaAstNode New AST node with variable bindings replaced by their matched values

Class TransformCtxt

Transformation context
TransformCtxt:replace_stmts_with (needle, callback)
Replace matching statements using given callback

Parameters:

  • needle string Statements pattern to search for, may include variable bindings
  • callback function(LuaAstNode,MatchCtxt) Function called for each match. Takes the matching node and a new MatchCtxt for that match. See MatchCtxt:fold_with
TransformCtxt:replace_expr_with (needle, haystack)
Replace matching expressions using given replacements

Parameters:

  • needle string Expression pattern to search for, may include variable bindings
  • haystack string Expression to replace needle with
TransformCtxt:replace_expr_with (needle, callback)
Replace matching expressions using given callback

Parameters:

  • needle string Expression pattern to search for, may include variable bindings
  • callback function(LuaAstNode,MatchCtxt) Function called for each match. Takes the matching node and a new MatchCtxt for that match. See MatchCtxt:fold_with
TransformCtxt:match (callback)
Create a new, empty MatchCtxt

Parameters:

  • callback function(MatchCtxt) Function called with the new match context
TransformCtxt:visit_crate (object)
Visits an entire crate via a lua object's methods

Parameters:

  • object Visitor Visitor whose methods will be called during the traversal
TransformCtxt:visit_crate (object)
Visits an entire crate via a lua object's methods

Parameters:

  • object Visitor Visitor whose methods will be called during the traversal
TransformCtxt:visit_fn_like (object)
Visits every fn like via a lua object's methods

Parameters:

  • object Visitor Visitor whose methods will be called during the traversal
TransformCtxt:visit_paths (node, QSelf)
Rewrite all paths in a crate

Parameters:

  • node LuaAstNode AST node to visit. Valid node types: {P}.
  • QSelf function(NodeId, , Path, Def) callback Function called for each path. Can modify QSelf and/or Path to rewrite the path.
TransformCtxt:create_use (Tree)
Create a new use item

Parameters:

  • Tree tab of paths to convert into a UseTree. Each leaf of the tree corresponds to a UseTree and is an array of items to import. Each of these items may be a string (the item name), an array with two values: the item name and an identifier to rebind the item name to (i.e. a as b), or the literal string '*' indicating a glob import from that module. The prefix for each UseTree is the sequence of keys in the map along the path to that leaf array.

Returns:

    LuaAstNode New use item node
TransformCtxt:get_node_type (node_id)
Get the node type of the node with the given id

Parameters:

  • node_id int the NodeId

Returns:

    LuaTy the type of that node (or nil)

scripting.into_lua_ast Functions

Stmt
AST Stmt

Fields:

  • type "Stmt"
  • kind string StmtKind of this statement

    StmtKind::Local only:

  • ty LuaAstNode Type of local (optional)
  • init LuaAstNode Initializer of local (optional)
  • pat LuaAstNode Name of local

    StmtKind::Item only:

  • item LuaAstNode Item node

    StmtKind::Semi and StmtKind::Expr only:

  • expr LuaAstNode Expression in this statement
Expr
AST Expr

Fields:

  • type "Expr"
  • kind string ExprKind of this expression

    ExprKind::Lit only:

  • value Literal value of this expression

Class Crate

Crate AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Crate:get_module ()
Return the "module" field of the current node

Returns:

    LuaAstNode the field
Crate:set_module (value)
Set the "module" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Crate:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
Crate:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Crate:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Crate:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Mod

Mod AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Mod:get_inner ()
Return the "inner" field of the current node

Returns:

    LuaAstNode the field
Mod:set_inner (value)
Set the "inner" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Mod:get_items ()
Return the "items" field of the current node

Returns:

    LuaAstNode the field
Mod:set_items (value)
Set the "items" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Mod:get_inline ()
Return the "inline" field of the current node

Returns:

    LuaAstNode the field
Mod:set_inline (value)
Set the "inline" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Item

Item AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Item:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
Item:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Item:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
Item:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Item:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Item:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Item:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
Item:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Item:get_vis ()
Return the "vis" field of the current node

Returns:

    LuaAstNode the field
Item:set_vis (value)
Set the "vis" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Item:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Item:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Item:get_tokens ()
Return the "tokens" field of the current node

Returns:

    LuaAstNode the field
Item:set_tokens (value)
Set the "tokens" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Item:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Item:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Item:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Item:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class ItemKind

ItemKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
ItemKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
ItemKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
ItemKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
ItemKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class UseTreeKind

UseTreeKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
UseTreeKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
UseTreeKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
UseTreeKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
UseTreeKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class UseTree

UseTree AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
UseTree:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
UseTree:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
UseTree:get_prefix ()
Return the "prefix" field of the current node

Returns:

    LuaAstNode the field
UseTree:set_prefix (value)
Set the "prefix" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
UseTree:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
UseTree:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
UseTree:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
UseTree:children ()
Return the children of the current node

Returns:

    Vec array containing the children
UseTree:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
UseTree:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class TraitItem

TraitItem AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
TraitItem:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
TraitItem:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TraitItem:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
TraitItem:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TraitItem:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
TraitItem:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TraitItem:get_generics ()
Return the "generics" field of the current node

Returns:

    LuaAstNode the field
TraitItem:set_generics (value)
Set the "generics" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TraitItem:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
TraitItem:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TraitItem:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
TraitItem:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TraitItem:get_tokens ()
Return the "tokens" field of the current node

Returns:

    LuaAstNode the field
TraitItem:set_tokens (value)
Set the "tokens" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TraitItem:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
TraitItem:children ()
Return the children of the current node

Returns:

    Vec array containing the children
TraitItem:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
TraitItem:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class TraitItemKind

TraitItemKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
TraitItemKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
TraitItemKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
TraitItemKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
TraitItemKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class ImplItem

ImplItem AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
ImplItem:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
ImplItem:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ImplItem:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
ImplItem:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ImplItem:get_vis ()
Return the "vis" field of the current node

Returns:

    LuaAstNode the field
ImplItem:set_vis (value)
Set the "vis" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ImplItem:get_defaultness ()
Return the "defaultness" field of the current node

Returns:

    LuaAstNode the field
ImplItem:set_defaultness (value)
Set the "defaultness" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ImplItem:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
ImplItem:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ImplItem:get_generics ()
Return the "generics" field of the current node

Returns:

    LuaAstNode the field
ImplItem:set_generics (value)
Set the "generics" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ImplItem:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
ImplItem:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ImplItem:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
ImplItem:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ImplItem:get_tokens ()
Return the "tokens" field of the current node

Returns:

    LuaAstNode the field
ImplItem:set_tokens (value)
Set the "tokens" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class ImplItemKind

ImplItemKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
ImplItemKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
ImplItemKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
ImplItemKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
ImplItemKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class TraitRef

TraitRef AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
TraitRef:get_path ()
Return the "path" field of the current node

Returns:

    LuaAstNode the field
TraitRef:set_path (value)
Set the "path" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TraitRef:get_ref_id ()
Return the "ref_id" field of the current node

Returns:

    LuaAstNode the field
TraitRef:set_ref_id (value)
Set the "ref_id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class EnumDef

EnumDef AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
EnumDef:get_variants ()
Return the "variants" field of the current node

Returns:

    LuaAstNode the field
EnumDef:set_variants (value)
Set the "variants" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Variant

Variant AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Variant:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
Variant:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Variant:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
Variant:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Variant:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Variant:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Variant:get_data ()
Return the "data" field of the current node

Returns:

    LuaAstNode the field
Variant:set_data (value)
Set the "data" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Variant:get_disr_expr ()
Return the "disr_expr" field of the current node

Returns:

    LuaAstNode the field
Variant:set_disr_expr (value)
Set the "disr_expr" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Variant:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Variant:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Variant:get_is_placeholder ()
Return the "is_placeholder" field of the current node

Returns:

    LuaAstNode the field
Variant:set_is_placeholder (value)
Set the "is_placeholder" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class VariantData

VariantData AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
VariantData:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
VariantData:children ()
Return the children of the current node

Returns:

    Vec array containing the children
VariantData:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
VariantData:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class StructField

StructField AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
StructField:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
StructField:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
StructField:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
StructField:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
StructField:get_vis ()
Return the "vis" field of the current node

Returns:

    LuaAstNode the field
StructField:set_vis (value)
Set the "vis" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
StructField:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
StructField:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
StructField:get_ty ()
Return the "ty" field of the current node

Returns:

    LuaAstNode the field
StructField:set_ty (value)
Set the "ty" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
StructField:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
StructField:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
StructField:get_is_placeholder ()
Return the "is_placeholder" field of the current node

Returns:

    LuaAstNode the field
StructField:set_is_placeholder (value)
Set the "is_placeholder" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class MethodSig

MethodSig AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
MethodSig:get_header ()
Return the "header" field of the current node

Returns:

    LuaAstNode the field
MethodSig:set_header (value)
Set the "header" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
MethodSig:get_decl ()
Return the "decl" field of the current node

Returns:

    LuaAstNode the field
MethodSig:set_decl (value)
Set the "decl" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class ForeignMod

ForeignMod AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
ForeignMod:get_abi ()
Return the "abi" field of the current node

Returns:

    LuaAstNode the field
ForeignMod:set_abi (value)
Set the "abi" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ForeignMod:get_items ()
Return the "items" field of the current node

Returns:

    LuaAstNode the field
ForeignMod:set_items (value)
Set the "items" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class ForeignItem

ForeignItem AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
ForeignItem:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
ForeignItem:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ForeignItem:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
ForeignItem:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ForeignItem:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
ForeignItem:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ForeignItem:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
ForeignItem:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ForeignItem:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
ForeignItem:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ForeignItem:get_vis ()
Return the "vis" field of the current node

Returns:

    LuaAstNode the field
ForeignItem:set_vis (value)
Set the "vis" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ForeignItem:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
ForeignItem:children ()
Return the children of the current node

Returns:

    Vec array containing the children
ForeignItem:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
ForeignItem:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class ForeignItemKind

ForeignItemKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
ForeignItemKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
ForeignItemKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
ForeignItemKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
ForeignItemKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Generics

Generics AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Generics:get_params ()
Return the "params" field of the current node

Returns:

    LuaAstNode the field
Generics:set_params (value)
Set the "params" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Generics:get_where_clause ()
Return the "where_clause" field of the current node

Returns:

    LuaAstNode the field
Generics:set_where_clause (value)
Set the "where_clause" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Generics:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Generics:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class GenericParam

GenericParam AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
GenericParam:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
GenericParam:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
GenericParam:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
GenericParam:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
GenericParam:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
GenericParam:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
GenericParam:get_bounds ()
Return the "bounds" field of the current node

Returns:

    LuaAstNode the field
GenericParam:set_bounds (value)
Set the "bounds" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
GenericParam:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
GenericParam:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
GenericParam:get_is_placeholder ()
Return the "is_placeholder" field of the current node

Returns:

    LuaAstNode the field
GenericParam:set_is_placeholder (value)
Set the "is_placeholder" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
GenericParam:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
GenericParam:children ()
Return the children of the current node

Returns:

    Vec array containing the children
GenericParam:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
GenericParam:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class GenericParamKind

GenericParamKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
GenericParamKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
GenericParamKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
GenericParamKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
GenericParamKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class WhereClause

WhereClause AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
WhereClause:get_predicates ()
Return the "predicates" field of the current node

Returns:

    LuaAstNode the field
WhereClause:set_predicates (value)
Set the "predicates" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
WhereClause:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
WhereClause:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class WherePredicate

WherePredicate AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
WherePredicate:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
WherePredicate:children ()
Return the children of the current node

Returns:

    Vec array containing the children
WherePredicate:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
WherePredicate:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class WhereBoundPredicate

WhereBoundPredicate AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
WhereBoundPredicate:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
WhereBoundPredicate:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
WhereBoundPredicate:get_bounded_ty ()
Return the "bounded_ty" field of the current node

Returns:

    LuaAstNode the field
WhereBoundPredicate:set_bounded_ty (value)
Set the "bounded_ty" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
WhereBoundPredicate:get_bounds ()
Return the "bounds" field of the current node

Returns:

    LuaAstNode the field
WhereBoundPredicate:set_bounds (value)
Set the "bounds" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
WhereBoundPredicate:get_bound_generic_params ()
Return the "boundgenericparams" field of the current node

Returns:

    LuaAstNode the field
WhereBoundPredicate:set_bound_generic_params (value)
Set the "boundgenericparams" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class WhereRegionPredicate

WhereRegionPredicate AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
WhereRegionPredicate:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
WhereRegionPredicate:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
WhereRegionPredicate:get_lifetime ()
Return the "lifetime" field of the current node

Returns:

    LuaAstNode the field
WhereRegionPredicate:set_lifetime (value)
Set the "lifetime" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
WhereRegionPredicate:get_bounds ()
Return the "bounds" field of the current node

Returns:

    LuaAstNode the field
WhereRegionPredicate:set_bounds (value)
Set the "bounds" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class WhereEqPredicate

WhereEqPredicate AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
WhereEqPredicate:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
WhereEqPredicate:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
WhereEqPredicate:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
WhereEqPredicate:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
WhereEqPredicate:get_lhs_ty ()
Return the "lhs_ty" field of the current node

Returns:

    LuaAstNode the field
WhereEqPredicate:set_lhs_ty (value)
Set the "lhs_ty" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
WhereEqPredicate:get_rhs_ty ()
Return the "rhs_ty" field of the current node

Returns:

    LuaAstNode the field
WhereEqPredicate:set_rhs_ty (value)
Set the "rhs_ty" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class TraitBoundModifier

TraitBoundModifier AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
TraitBoundModifier:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
TraitBoundModifier:children ()
Return the children of the current node

Returns:

    Vec array containing the children
TraitBoundModifier:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
TraitBoundModifier:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class VisibilityKind

VisibilityKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
VisibilityKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
VisibilityKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
VisibilityKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
VisibilityKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class CrateSugar

CrateSugar AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
CrateSugar:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
CrateSugar:children ()
Return the children of the current node

Returns:

    Vec array containing the children
CrateSugar:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
CrateSugar:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Ty

Ty AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Ty:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Ty:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Ty:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
Ty:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Ty:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Ty:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Ty:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Ty:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Ty:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Ty:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class MutTy

MutTy AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
MutTy:get_ty ()
Return the "ty" field of the current node

Returns:

    LuaAstNode the field
MutTy:set_ty (value)
Set the "ty" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
MutTy:get_mutbl ()
Return the "mutbl" field of the current node

Returns:

    LuaAstNode the field
MutTy:set_mutbl (value)
Set the "mutbl" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class TyKind

TyKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
TyKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
TyKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
TyKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
TyKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class TraitObjectSyntax

TraitObjectSyntax AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
TraitObjectSyntax:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
TraitObjectSyntax:children ()
Return the children of the current node

Returns:

    Vec array containing the children
TraitObjectSyntax:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
TraitObjectSyntax:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class LitIntType

LitIntType AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
LitIntType:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
LitIntType:children ()
Return the children of the current node

Returns:

    Vec array containing the children
LitIntType:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
LitIntType:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class IntTy

IntTy AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
IntTy:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
IntTy:children ()
Return the children of the current node

Returns:

    Vec array containing the children
IntTy:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
IntTy:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class UintTy

UintTy AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
UintTy:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
UintTy:children ()
Return the children of the current node

Returns:

    Vec array containing the children
UintTy:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
UintTy:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class FloatTy

FloatTy AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
FloatTy:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
FloatTy:children ()
Return the children of the current node

Returns:

    Vec array containing the children
FloatTy:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
FloatTy:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class BareFnTy

BareFnTy AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
BareFnTy:get_unsafety ()
Return the "unsafety" field of the current node

Returns:

    LuaAstNode the field
BareFnTy:set_unsafety (value)
Set the "unsafety" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
BareFnTy:get_abi ()
Return the "abi" field of the current node

Returns:

    LuaAstNode the field
BareFnTy:set_abi (value)
Set the "abi" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
BareFnTy:get_decl ()
Return the "decl" field of the current node

Returns:

    LuaAstNode the field
BareFnTy:set_decl (value)
Set the "decl" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
BareFnTy:get_generic_params ()
Return the "generic_params" field of the current node

Returns:

    LuaAstNode the field
BareFnTy:set_generic_params (value)
Set the "generic_params" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Lifetime

Lifetime AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Lifetime:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Lifetime:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Lifetime:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
Lifetime:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class GenericBound

GenericBound AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
GenericBound:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
GenericBound:children ()
Return the children of the current node

Returns:

    Vec array containing the children
GenericBound:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
GenericBound:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class PolyTraitRef

PolyTraitRef AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
PolyTraitRef:get_trait_ref ()
Return the "trait_ref" field of the current node

Returns:

    LuaAstNode the field
PolyTraitRef:set_trait_ref (value)
Set the "trait_ref" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
PolyTraitRef:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
PolyTraitRef:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
PolyTraitRef:get_bound_generic_params ()
Return the "boundgenericparams" field of the current node

Returns:

    LuaAstNode the field
PolyTraitRef:set_bound_generic_params (value)
Set the "boundgenericparams" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class FnDecl

FnDecl AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
FnDecl:get_inputs ()
Return the "inputs" field of the current node

Returns:

    LuaAstNode the field
FnDecl:set_inputs (value)
Set the "inputs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
FnDecl:get_output ()
Return the "output" field of the current node

Returns:

    LuaAstNode the field
FnDecl:set_output (value)
Set the "output" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class FnHeader

FnHeader AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
FnHeader:get_unsafety ()
Return the "unsafety" field of the current node

Returns:

    LuaAstNode the field
FnHeader:set_unsafety (value)
Set the "unsafety" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
FnHeader:get_asyncness ()
Return the "asyncness" field of the current node

Returns:

    LuaAstNode the field
FnHeader:set_asyncness (value)
Set the "asyncness" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
FnHeader:get_constness ()
Return the "constness" field of the current node

Returns:

    LuaAstNode the field
FnHeader:set_constness (value)
Set the "constness" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
FnHeader:get_abi ()
Return the "abi" field of the current node

Returns:

    LuaAstNode the field
FnHeader:set_abi (value)
Set the "abi" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Param

Param AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Param:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
Param:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Param:get_ty ()
Return the "ty" field of the current node

Returns:

    LuaAstNode the field
Param:set_ty (value)
Set the "ty" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Param:get_pat ()
Return the "pat" field of the current node

Returns:

    LuaAstNode the field
Param:set_pat (value)
Set the "pat" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Param:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Param:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Param:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Param:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Param:get_is_placeholder ()
Return the "is_placeholder" field of the current node

Returns:

    LuaAstNode the field
Param:set_is_placeholder (value)
Set the "is_placeholder" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class FunctionRetTy

FunctionRetTy AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
FunctionRetTy:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
FunctionRetTy:children ()
Return the children of the current node

Returns:

    Vec array containing the children
FunctionRetTy:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
FunctionRetTy:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Stmt

Stmt AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Stmt:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Stmt:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Stmt:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
Stmt:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Stmt:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Stmt:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Stmt:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Stmt:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Stmt:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Stmt:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class StmtKind

StmtKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
StmtKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
StmtKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
StmtKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
StmtKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Local

Local AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Local:get_pat ()
Return the "pat" field of the current node

Returns:

    LuaAstNode the field
Local:set_pat (value)
Set the "pat" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Local:get_ty ()
Return the "ty" field of the current node

Returns:

    LuaAstNode the field
Local:set_ty (value)
Set the "ty" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Local:get_init ()
Return the "init" field of the current node

Returns:

    LuaAstNode the field
Local:set_init (value)
Set the "init" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Local:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Local:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Local:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Local:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Local:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
Local:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Expr

Expr AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Expr:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Expr:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Expr:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
Expr:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Expr:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Expr:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Expr:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
Expr:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Expr:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Expr:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Expr:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Expr:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class ExprKind

ExprKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
ExprKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
ExprKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
ExprKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
ExprKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class IsAsync

IsAsync AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
IsAsync:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
IsAsync:children ()
Return the children of the current node

Returns:

    Vec array containing the children
IsAsync:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
IsAsync:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Movability

Movability AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Movability:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Movability:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Movability:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Movability:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class UnOp

UnOp AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
UnOp:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
UnOp:children ()
Return the children of the current node

Returns:

    Vec array containing the children
UnOp:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
UnOp:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class BinOpKind

BinOpKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
BinOpKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
BinOpKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
BinOpKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
BinOpKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Field

Field AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Field:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Field:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Field:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
Field:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Field:get_expr ()
Return the "expr" field of the current node

Returns:

    LuaAstNode the field
Field:set_expr (value)
Set the "expr" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Field:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Field:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Field:get_is_shorthand ()
Return the "is_shorthand" field of the current node

Returns:

    LuaAstNode the field
Field:set_is_shorthand (value)
Set the "is_shorthand" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Field:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
Field:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Field:get_is_placeholder ()
Return the "is_placeholder" field of the current node

Returns:

    LuaAstNode the field
Field:set_is_placeholder (value)
Set the "is_placeholder" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Arm

Arm AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Arm:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Arm:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Arm:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
Arm:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Arm:get_pat ()
Return the "pat" field of the current node

Returns:

    LuaAstNode the field
Arm:set_pat (value)
Set the "pat" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Arm:get_guard ()
Return the "guard" field of the current node

Returns:

    LuaAstNode the field
Arm:set_guard (value)
Set the "guard" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Arm:get_body ()
Return the "body" field of the current node

Returns:

    LuaAstNode the field
Arm:set_body (value)
Set the "body" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Arm:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Arm:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Arm:get_is_placeholder ()
Return the "is_placeholder" field of the current node

Returns:

    LuaAstNode the field
Arm:set_is_placeholder (value)
Set the "is_placeholder" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Block

Block AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Block:get_stmts ()
Return the "stmts" field of the current node

Returns:

    LuaAstNode the field
Block:set_stmts (value)
Set the "stmts" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Block:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Block:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Block:get_rules ()
Return the "rules" field of the current node

Returns:

    LuaAstNode the field
Block:set_rules (value)
Set the "rules" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Block:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Block:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Pat

Pat AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Pat:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Pat:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Pat:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
Pat:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Pat:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Pat:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Pat:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Pat:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Pat:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Pat:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class PatKind

PatKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
PatKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
PatKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
PatKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
PatKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class FieldPat

FieldPat AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
FieldPat:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
FieldPat:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
FieldPat:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
FieldPat:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
FieldPat:get_pat ()
Return the "pat" field of the current node

Returns:

    LuaAstNode the field
FieldPat:set_pat (value)
Set the "pat" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
FieldPat:get_is_shorthand ()
Return the "is_shorthand" field of the current node

Returns:

    LuaAstNode the field
FieldPat:set_is_shorthand (value)
Set the "is_shorthand" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
FieldPat:get_attrs ()
Return the "attrs" field of the current node

Returns:

    LuaAstNode the field
FieldPat:set_attrs (value)
Set the "attrs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
FieldPat:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
FieldPat:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
FieldPat:get_is_placeholder ()
Return the "is_placeholder" field of the current node

Returns:

    LuaAstNode the field
FieldPat:set_is_placeholder (value)
Set the "is_placeholder" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Lit

Lit AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Lit:get_token ()
Return the "token" field of the current node

Returns:

    LuaAstNode the field
Lit:set_token (value)
Set the "token" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Lit:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
Lit:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Lit:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Lit:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Lit:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Lit:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Lit:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Lit:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class LitKind

LitKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
LitKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
LitKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
LitKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
LitKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class TokenLit

TokenLit AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
TokenLit:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
TokenLit:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TokenLit:get_symbol ()
Return the "symbol" field of the current node

Returns:

    LuaAstNode the field
TokenLit:set_symbol (value)
Set the "symbol" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TokenLit:get_suffix ()
Return the "suffix" field of the current node

Returns:

    LuaAstNode the field
TokenLit:set_suffix (value)
Set the "suffix" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
TokenLit:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
TokenLit:children ()
Return the children of the current node

Returns:

    Vec array containing the children
TokenLit:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
TokenLit:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class TokenLitKind

TokenLitKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
TokenLitKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
TokenLitKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
TokenLitKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
TokenLitKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Defaultness

Defaultness AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Defaultness:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Defaultness:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Defaultness:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Defaultness:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Constness

Constness AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Constness:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Constness:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Constness:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Constness:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class ImplPolarity

ImplPolarity AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
ImplPolarity:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
ImplPolarity:children ()
Return the children of the current node

Returns:

    Vec array containing the children
ImplPolarity:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
ImplPolarity:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class IsAuto

IsAuto AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
IsAuto:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
IsAuto:children ()
Return the children of the current node

Returns:

    Vec array containing the children
IsAuto:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
IsAuto:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Unsafety

Unsafety AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Unsafety:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Unsafety:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Unsafety:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Unsafety:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Mutability

Mutability AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Mutability:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Mutability:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Mutability:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Mutability:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class RangeEnd

RangeEnd AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
RangeEnd:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
RangeEnd:children ()
Return the children of the current node

Returns:

    Vec array containing the children
RangeEnd:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
RangeEnd:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class RangeSyntax

RangeSyntax AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
RangeSyntax:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
RangeSyntax:children ()
Return the children of the current node

Returns:

    Vec array containing the children
RangeSyntax:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
RangeSyntax:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class BindingMode

BindingMode AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
BindingMode:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
BindingMode:children ()
Return the children of the current node

Returns:

    Vec array containing the children
BindingMode:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
BindingMode:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class CaptureBy

CaptureBy AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
CaptureBy:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
CaptureBy:children ()
Return the children of the current node

Returns:

    Vec array containing the children
CaptureBy:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
CaptureBy:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class BlockCheckMode

BlockCheckMode AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
BlockCheckMode:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
BlockCheckMode:children ()
Return the children of the current node

Returns:

    Vec array containing the children
BlockCheckMode:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
BlockCheckMode:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class UnsafeSource

UnsafeSource AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
UnsafeSource:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
UnsafeSource:children ()
Return the children of the current node

Returns:

    Vec array containing the children
UnsafeSource:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
UnsafeSource:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class StrStyle

StrStyle AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
StrStyle:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
StrStyle:children ()
Return the children of the current node

Returns:

    Vec array containing the children
StrStyle:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
StrStyle:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class AsmDialect

AsmDialect AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
AsmDialect:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
AsmDialect:children ()
Return the children of the current node

Returns:

    Vec array containing the children
AsmDialect:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
AsmDialect:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class RangeLimits

RangeLimits AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
RangeLimits:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
RangeLimits:children ()
Return the children of the current node

Returns:

    Vec array containing the children
RangeLimits:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
RangeLimits:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Attribute

Attribute AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Attribute:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
Attribute:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Attribute:get_style ()
Return the "style" field of the current node

Returns:

    LuaAstNode the field
Attribute:set_style (value)
Set the "style" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Attribute:get_item ()
Return the "item" field of the current node

Returns:

    LuaAstNode the field
Attribute:set_item (value)
Set the "item" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Attribute:get_is_sugared_doc ()
Return the "issugareddoc" field of the current node

Returns:

    LuaAstNode the field
Attribute:set_is_sugared_doc (value)
Set the "issugareddoc" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Attribute:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Attribute:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class AttrItem

AttrItem AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
AttrItem:get_path ()
Return the "path" field of the current node

Returns:

    LuaAstNode the field
AttrItem:set_path (value)
Set the "path" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
AttrItem:get_tokens ()
Return the "tokens" field of the current node

Returns:

    LuaAstNode the field
AttrItem:set_tokens (value)
Set the "tokens" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class AttrStyle

AttrStyle AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
AttrStyle:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
AttrStyle:children ()
Return the children of the current node

Returns:

    Vec array containing the children
AttrStyle:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
AttrStyle:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Path

Path AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Path:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Path:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Path:get_segments ()
Return the "segments" field of the current node

Returns:

    LuaAstNode the field
Path:set_segments (value)
Set the "segments" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class PathSegment

PathSegment AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
PathSegment:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
PathSegment:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
PathSegment:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
PathSegment:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
PathSegment:get_args ()
Return the "args" field of the current node

Returns:

    LuaAstNode the field
PathSegment:set_args (value)
Set the "args" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class GenericArgs

GenericArgs AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
GenericArgs:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
GenericArgs:children ()
Return the children of the current node

Returns:

    Vec array containing the children
GenericArgs:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
GenericArgs:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class AngleBracketedArgs

AngleBracketedArgs AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
AngleBracketedArgs:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
AngleBracketedArgs:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
AngleBracketedArgs:get_args ()
Return the "args" field of the current node

Returns:

    LuaAstNode the field
AngleBracketedArgs:set_args (value)
Set the "args" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
AngleBracketedArgs:get_constraints ()
Return the "constraints" field of the current node

Returns:

    LuaAstNode the field
AngleBracketedArgs:set_constraints (value)
Set the "constraints" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class ParenthesizedArgs

ParenthesizedArgs AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
ParenthesizedArgs:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
ParenthesizedArgs:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ParenthesizedArgs:get_inputs ()
Return the "inputs" field of the current node

Returns:

    LuaAstNode the field
ParenthesizedArgs:set_inputs (value)
Set the "inputs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
ParenthesizedArgs:get_output ()
Return the "output" field of the current node

Returns:

    LuaAstNode the field
ParenthesizedArgs:set_output (value)
Set the "output" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class GenericArg

GenericArg AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
GenericArg:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
GenericArg:children ()
Return the children of the current node

Returns:

    Vec array containing the children
GenericArg:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
GenericArg:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class QSelf

QSelf AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
QSelf:get_ty ()
Return the "ty" field of the current node

Returns:

    LuaAstNode the field
QSelf:set_ty (value)
Set the "ty" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
QSelf:get_path_span ()
Return the "path_span" field of the current node

Returns:

    LuaAstNode the field
QSelf:set_path_span (value)
Set the "path_span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
QSelf:get_position ()
Return the "position" field of the current node

Returns:

    LuaAstNode the field
QSelf:set_position (value)
Set the "position" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class AssocTyConstraint

AssocTyConstraint AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
AssocTyConstraint:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
AssocTyConstraint:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
AssocTyConstraint:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
AssocTyConstraint:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
AssocTyConstraint:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
AssocTyConstraint:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
AssocTyConstraint:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
AssocTyConstraint:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class AssocTyConstraintKind

AssocTyConstraintKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
AssocTyConstraintKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
AssocTyConstraintKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
AssocTyConstraintKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
AssocTyConstraintKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Mac

Mac AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Mac:get_path ()
Return the "path" field of the current node

Returns:

    LuaAstNode the field
Mac:set_path (value)
Set the "path" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Mac:get_delim ()
Return the "delim" field of the current node

Returns:

    LuaAstNode the field
Mac:set_delim (value)
Set the "delim" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Mac:get_tts ()
Return the "tts" field of the current node

Returns:

    LuaAstNode the field
Mac:set_tts (value)
Set the "tts" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Mac:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Mac:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Mac:get_prior_type_ascription ()
Return the "priortypeascription" field of the current node

Returns:

    LuaAstNode the field
Mac:set_prior_type_ascription (value)
Set the "priortypeascription" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class MacStmtStyle

MacStmtStyle AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
MacStmtStyle:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
MacStmtStyle:children ()
Return the children of the current node

Returns:

    Vec array containing the children
MacStmtStyle:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
MacStmtStyle:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class MacroDef

MacroDef AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
MacroDef:get_tokens ()
Return the "tokens" field of the current node

Returns:

    LuaAstNode the field
MacroDef:set_tokens (value)
Set the "tokens" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
MacroDef:get_legacy ()
Return the "legacy" field of the current node

Returns:

    LuaAstNode the field
MacroDef:set_legacy (value)
Set the "legacy" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class InlineAsm

InlineAsm AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
InlineAsm:get_asm ()
Return the "asm" field of the current node

Returns:

    LuaAstNode the field
InlineAsm:set_asm (value)
Set the "asm" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
InlineAsm:get_asm_str_style ()
Return the "asmstrstyle" field of the current node

Returns:

    LuaAstNode the field
InlineAsm:set_asm_str_style (value)
Set the "asmstrstyle" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
InlineAsm:get_outputs ()
Return the "outputs" field of the current node

Returns:

    LuaAstNode the field
InlineAsm:set_outputs (value)
Set the "outputs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
InlineAsm:get_inputs ()
Return the "inputs" field of the current node

Returns:

    LuaAstNode the field
InlineAsm:set_inputs (value)
Set the "inputs" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
InlineAsm:get_clobbers ()
Return the "clobbers" field of the current node

Returns:

    LuaAstNode the field
InlineAsm:set_clobbers (value)
Set the "clobbers" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
InlineAsm:get_volatile ()
Return the "volatile" field of the current node

Returns:

    LuaAstNode the field
InlineAsm:set_volatile (value)
Set the "volatile" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
InlineAsm:get_alignstack ()
Return the "alignstack" field of the current node

Returns:

    LuaAstNode the field
InlineAsm:set_alignstack (value)
Set the "alignstack" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
InlineAsm:get_dialect ()
Return the "dialect" field of the current node

Returns:

    LuaAstNode the field
InlineAsm:set_dialect (value)
Set the "dialect" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class GlobalAsm

GlobalAsm AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
GlobalAsm:get_asm ()
Return the "asm" field of the current node

Returns:

    LuaAstNode the field
GlobalAsm:set_asm (value)
Set the "asm" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class InlineAsmOutput

InlineAsmOutput AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
InlineAsmOutput:get_constraint ()
Return the "constraint" field of the current node

Returns:

    LuaAstNode the field
InlineAsmOutput:set_constraint (value)
Set the "constraint" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
InlineAsmOutput:get_expr ()
Return the "expr" field of the current node

Returns:

    LuaAstNode the field
InlineAsmOutput:set_expr (value)
Set the "expr" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
InlineAsmOutput:get_is_rw ()
Return the "is_rw" field of the current node

Returns:

    LuaAstNode the field
InlineAsmOutput:set_is_rw (value)
Set the "is_rw" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
InlineAsmOutput:get_is_indirect ()
Return the "is_indirect" field of the current node

Returns:

    LuaAstNode the field
InlineAsmOutput:set_is_indirect (value)
Set the "is_indirect" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Label

Label AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Label:get_ident ()
Return the "ident" field of the current node

Returns:

    LuaAstNode the field
Label:set_ident (value)
Set the "ident" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class MacDelimiter

MacDelimiter AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
MacDelimiter:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
MacDelimiter:children ()
Return the children of the current node

Returns:

    Vec array containing the children
MacDelimiter:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
MacDelimiter:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class AnonConst

AnonConst AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
AnonConst:get_id ()
Return the "id" field of the current node

Returns:

    LuaAstNode the field
AnonConst:set_id (value)
Set the "id" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
AnonConst:get_value ()
Return the "value" field of the current node

Returns:

    LuaAstNode the field
AnonConst:set_value (value)
Set the "value" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Ident

Ident AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Ident:get_name ()
Return the "name" field of the current node

Returns:

    LuaAstNode the field
Ident:set_name (value)
Set the "name" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Ident:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Ident:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Nonterminal

Nonterminal AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Nonterminal:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Nonterminal:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Nonterminal:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Nonterminal:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class TokenTree

TokenTree AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
TokenTree:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
TokenTree:children ()
Return the children of the current node

Returns:

    Vec array containing the children
TokenTree:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
TokenTree:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class DelimSpan

DelimSpan AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
DelimSpan:get_open ()
Return the "open" field of the current node

Returns:

    LuaAstNode the field
DelimSpan:set_open (value)
Set the "open" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
DelimSpan:get_close ()
Return the "close" field of the current node

Returns:

    LuaAstNode the field
DelimSpan:set_close (value)
Set the "close" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class DelimToken

DelimToken AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
DelimToken:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
DelimToken:children ()
Return the children of the current node

Returns:

    Vec array containing the children
DelimToken:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
DelimToken:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class Token

Token AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
Token:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
Token:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Token:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
Token:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
Token:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
Token:children ()
Return the children of the current node

Returns:

    Vec array containing the children
Token:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
Token:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class TokenKind

TokenKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
TokenKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
TokenKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
TokenKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
TokenKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class BinOpToken

BinOpToken AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
BinOpToken:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
BinOpToken:children ()
Return the children of the current node

Returns:

    Vec array containing the children
BinOpToken:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
BinOpToken:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class MetaItem

MetaItem AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
MetaItem:get_path ()
Return the "path" field of the current node

Returns:

    LuaAstNode the field
MetaItem:set_path (value)
Set the "path" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
MetaItem:get_kind ()
Return the "kind" field of the current node

Returns:

    LuaAstNode the field
MetaItem:set_kind (value)
Set the "kind" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
MetaItem:get_span ()
Return the "span" field of the current node

Returns:

    LuaAstNode the field
MetaItem:set_span (value)
Set the "span" field of the current node to a new value

Parameters:

  • value the replacement value. Can be a LuaAstNode or a direct Lua representation
MetaItem:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
MetaItem:children ()
Return the children of the current node

Returns:

    Vec array containing the children
MetaItem:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
MetaItem:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class MetaItemKind

MetaItemKind AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
MetaItemKind:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
MetaItemKind:children ()
Return the children of the current node

Returns:

    Vec array containing the children
MetaItemKind:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
MetaItemKind:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class NestedMetaItem

NestedMetaItem AST node handle This object is NOT thread-safe. Do not use an object of this class from a thread that did not acquire it.
NestedMetaItem:kind_name ()
Return the kind of the current node as a string

Returns:

    string string representation of the kind
NestedMetaItem:children ()
Return the children of the current node

Returns:

    Vec array containing the children
NestedMetaItem:child (idx)
Return a copy of the given child

Parameters:

  • idx the index of the child. Can be an integer or a string

Returns:

    LuaAstNode the child
NestedMetaItem:replace_child (idx, value)
Replace a child of the current node with a new value

Parameters:

  • idx the index of the child. Can be an integer or a string
  • value the replacement value. Can be a LuaAstNode or a direct Lua representation

Class LuaTy

Lua encoding of a Ty<'tcx> type.
LuaTy:kind_name ()
Return the kind of this type

Returns:

    string the kind as a string
generated by LDoc 1.4.6 Last updated 2019-11-08 18:49:10