pub enum SyntaxNode {
Show 66 variants
Annotation {
name: String,
arguments_id: Option<NodeId>,
},
Argument,
ArgumentList,
ArrayInitializer,
Assignment {
variable_id: NodeId,
value_id: Option<NodeId>,
operator: Option<String>,
},
Attribute {
name: String,
},
AwaitExpression {
expression_id: NodeId,
},
BinaryOperation {
operator: String,
left_id: Option<NodeId>,
right_id: Option<NodeId>,
},
Break,
CatchClause {
block_id: Option<NodeId>,
catch_declaration: Option<NodeId>,
},
CatchDeclaration,
Class {
name: String,
block_id: Option<NodeId>,
modifiers_id: Option<NodeId>,
inherited_class: Option<String>,
access_modifiers: Option<String>,
},
ClassBody,
Comment {
comment: String,
},
Continue,
Declaration {
name: String,
block_id: Option<NodeId>,
access_modifiers: Option<String>,
},
DeclarationBlock,
Default,
DoStatement {
block_id: NodeId,
condition_id: NodeId,
},
ElementAccess {
expression_id: NodeId,
arguments_id: Option<NodeId>,
},
ElseClause {
block_id: NodeId,
},
ExecutionBlock,
Export {
expression: Option<String>,
declaration_id: Option<NodeId>,
},
ExpressionStatement,
File,
FinallyClause {
block_id: Option<NodeId>,
},
ForEachStatement {
variable_id: NodeId,
iterable_item_id: NodeId,
block_id: Option<NodeId>,
},
ForStatement {
block_id: NodeId,
initializer_id: Option<NodeId>,
condition_id: Option<NodeId>,
update_id: Option<NodeId>,
},
If {
condition_id: NodeId,
true_id: Option<NodeId>,
false_id: Option<NodeId>,
initializer: Option<NodeId>,
},
Import {
expression: Option<String>,
alias: Option<String>,
method_name: Option<String>,
import_type: Option<String>,
},
JsxElement,
LambdaFunctionType,
Literal {
value: String,
value_type: String,
},
MemberAccess {
member: String,
expression: String,
expression_id: NodeId,
symbol_scope: Option<NodeId>,
},
Metadata {
path: String,
structure: BTreeMap<String, FileStructData>,
instances: BTreeMap<String, BTreeMap<String, FileInstanceData>>,
imports: Vec<String>,
package: Option<String>,
},
MethodDeclaration {
name: Option<String>,
access_modifiers: Option<String>,
block_id: Option<NodeId>,
modifiers_id: Option<NodeId>,
parameters_id: Option<NodeId>,
},
MethodInvocation {
expression: String,
object: Option<String>,
symbol_scope: Option<NodeId>,
expression_id: Option<NodeId>,
arguments_id: Option<NodeId>,
object_id: Option<NodeId>,
block_id: Option<NodeId>,
receiver_type_fqn: Option<String>,
},
MissingNode {
node_type: String,
},
Modifiers,
ModuleImport {
expression: String,
alias: Option<String>,
},
NamedArgument {
value_id: NodeId,
argument_name: Option<String>,
},
Namespace {
name: String,
block_id: Option<NodeId>,
},
NewExpression {
constructor_id: NodeId,
arguments_id: Option<NodeId>,
},
Object {
name: Option<String>,
tf_reference: Option<String>,
},
ObjectCreation {
name: String,
arguments_id: Option<NodeId>,
initializer_id: Option<NodeId>,
},
Pair {
key_id: NodeId,
value_id: NodeId,
},
Parameter {
variable: Option<String>,
variable_type: Option<String>,
value_id: Option<NodeId>,
parameter_mode: Option<String>,
},
ParameterList,
ParenthesizedExpression,
ReservedWord {
value: String,
},
RestPattern {
value_id: NodeId,
},
Return {
value_id: Option<NodeId>,
},
Selector {
selector_name: Option<String>,
},
SpreadElement {
value_id: NodeId,
},
SwitchBody,
SwitchSection {
case_expression: String,
},
SwitchStatement {
block_id: NodeId,
value_id: NodeId,
},
SymbolLookup {
symbol: String,
symbol_scope: Option<NodeId>,
value: Option<String>,
},
TernaryOperation {
condition_id: NodeId,
true_id: NodeId,
false_id: NodeId,
},
This {
value: String,
},
ThrowStatement {
expression_id: Option<NodeId>,
},
TryStatement {
block_id: NodeId,
resources_id: Option<NodeId>,
},
UnaryExpression {
operator: String,
operand_id: NodeId,
},
UsingStatement {
block_id: NodeId,
declaration_id: Option<NodeId>,
},
VariableDeclaration {
variable: String,
variable_type: Option<String>,
value_id: Option<NodeId>,
variable_id: Option<NodeId>,
access_modifier: Option<String>,
},
WhileStatement {
block_id: NodeId,
condition_id: Option<NodeId>,
},
}Variants§
Annotation
Argument
ArgumentList
ArrayInitializer
Assignment
Attribute
AwaitExpression
BinaryOperation
Break
CatchClause
CatchDeclaration
Class
Fields
ClassBody
Comment
Continue
Declaration
DeclarationBlock
Default
DoStatement
ElementAccess
ElseClause
ExecutionBlock
Export
ExpressionStatement
File
FinallyClause
ForEachStatement
ForStatement
Fields
If
Fields
Import
Fields
JsxElement
LambdaFunctionType
Literal
MemberAccess
Metadata
Fields
§
structure: BTreeMap<String, FileStructData>MethodDeclaration
Fields
MethodInvocation
Fields
MissingNode
Modifiers
ModuleImport
NamedArgument
Namespace
NewExpression
Object
ObjectCreation
Pair
Parameter
Fields
ParameterList
ParenthesizedExpression
ReservedWord
RestPattern
Return
Selector
SpreadElement
SwitchBody
SwitchSection
SwitchStatement
SymbolLookup
TernaryOperation
This
ThrowStatement
TryStatement
UnaryExpression
UsingStatement
VariableDeclaration
Fields
WhileStatement
Implementations§
Source§impl SyntaxNode
impl SyntaxNode
pub const fn arguments_id(&self) -> Option<NodeId>
pub const fn block_id(&self) -> Option<NodeId>
pub fn name(&self) -> Option<&str>
pub fn variable(&self) -> Option<&str>
pub const fn symbol(&self) -> Option<&str>
pub fn expression(&self) -> Option<&str>
pub fn alias(&self) -> Option<&str>
pub fn value(&self) -> Option<&str>
pub const fn object_id(&self) -> Option<NodeId>
pub const fn value_id(&self) -> Option<NodeId>
pub const fn variable_id(&self) -> Option<NodeId>
pub fn label_type(&self) -> &'static str
Trait Implementations§
Source§impl Clone for SyntaxNode
impl Clone for SyntaxNode
Source§fn clone(&self) -> SyntaxNode
fn clone(&self) -> SyntaxNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SyntaxNode
impl Debug for SyntaxNode
impl Eq for SyntaxNode
Source§impl<'_enum> From<&'_enum SyntaxNode> for SyntaxKind
impl<'_enum> From<&'_enum SyntaxNode> for SyntaxKind
Source§fn from(val: &'_enum SyntaxNode) -> SyntaxKind
fn from(val: &'_enum SyntaxNode) -> SyntaxKind
Converts to this type from the input type.
Source§impl From<SyntaxNode> for SyntaxKind
impl From<SyntaxNode> for SyntaxKind
Source§fn from(val: SyntaxNode) -> SyntaxKind
fn from(val: SyntaxNode) -> SyntaxKind
Converts to this type from the input type.
Source§impl IntoDiscriminant for SyntaxNode
impl IntoDiscriminant for SyntaxNode
Source§type Discriminant = SyntaxKind
type Discriminant = SyntaxKind
Enum listing the same variants as this enum but without any data fields
fn discriminant(&self) -> Self::Discriminant
Source§impl PartialEq for SyntaxNode
impl PartialEq for SyntaxNode
impl StructuralPartialEq for SyntaxNode
Auto Trait Implementations§
impl Freeze for SyntaxNode
impl RefUnwindSafe for SyntaxNode
impl Send for SyntaxNode
impl Sync for SyntaxNode
impl Unpin for SyntaxNode
impl UnsafeUnpin for SyntaxNode
impl UnwindSafe for SyntaxNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more