Module Refactor
Refactoring module
-
visit_stmts (callback)
-
Visit statements
Parameters:
- callback
function(LuaAstNode)
Function to call when visiting each statement
-
refactor
-
Global refactoring state
- refactor
RefactorState object
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.
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
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:
Returns:
LuaTy
the type of that node (or nil)
-
Stmt
-
AST Stmt
Fields:
-
Expr
-
AST Expr
Fields:
- type
"Expr"
- kind
string
ExprKind of this expression
ExprKind::Lit
only:
- value
Literal value of this expression
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Lua encoding of a Ty<'tcx>
type.
-
LuaTy:kind_name ()
-
Return the kind of this type
Returns:
string
the kind as a string