CSharpElementType

Enum CSharpElementType 

Source
pub enum CSharpElementType {
Show 179 variants Root, CompilationUnit, NamespaceDeclaration, UsingDirective, ClassDeclaration, StructDeclaration, InterfaceDeclaration, EnumDeclaration, DelegateDeclaration, MethodDeclaration, PropertyDeclaration, FieldDeclaration, EventDeclaration, IndexerDeclaration, ConstructorDeclaration, DestructorDeclaration, OperatorDeclaration, ConversionOperatorDeclaration, Parameter, TypeParameter, Constraint, Attribute, AttributeList, Block, ExpressionStatement, IfStatement, SwitchStatement, WhileStatement, ForStatement, ForeachStatement, DoStatement, TryStatement, CatchClause, FinallyClause, ThrowStatement, ReturnStatement, BreakStatement, ContinueStatement, GotoStatement, LabeledStatement, LockStatement, UsingStatement, FixedStatement, UnsafeStatement, CheckedStatement, UncheckedStatement, YieldStatement, LocalDeclarationStatement, BinaryExpression, UnaryExpression, AssignmentExpression, ConditionalExpression, InvocationExpression, MemberAccessExpression, ElementAccessExpression, CastExpression, AsExpression, IsExpression, TypeOfExpression, SizeOfExpression, DefaultExpression, LiteralExpression, ThisExpression, BaseExpression, IdentifierName, QualifiedName, GenericName, AliasQualifiedName, PredefinedType, ArrayType, PointerType, NullableType, TupleType, RefType, ArrayCreationExpression, ImplicitArrayCreationExpression, StackAllocArrayCreationExpression, ObjectCreationExpression, AnonymousObjectCreationExpression, ArrayInitializerExpression, CollectionInitializerExpression, ComplexElementInitializerExpression, ObjectInitializerExpression, MemberInitializerExpression, LambdaExpression, AnonymousMethodExpression, QueryExpression, QueryBody, FromClause, LetClause, WhereClause, JoinClause, JoinIntoClause, OrderByClause, Ordering, SelectClause, GroupClause, QueryContinuation, OmittedArraySizeExpression, InterpolatedStringExpression, InterpolatedStringText, Interpolation, InterpolationAlignmentClause, InterpolationFormatClause, GlobalStatement, SimpleLambdaExpression, ParenthesizedLambdaExpression, InitializerExpression, ImplicitElementAccess, PostfixUnaryExpression, PrefixUnaryExpression, AwaitExpression, NameColon, DeclarationExpression, TupleExpression, TupleElement, SingleVariableDesignation, ParenthesizedVariableDesignation, DiscardDesignation, RefExpression, RefTypeExpression, RefValueExpression, MakeRefExpression, CheckedExpression, UncheckedExpression, DefaultLiteralExpression, ConditionalAccessExpression, MemberBindingExpression, ElementBindingExpression, ImplicitStackAllocArrayCreationExpression, IsPatternExpression, ThrowExpression, WhenClause, ConstantPattern, DeclarationPattern, VarPattern, RecursivePattern, PositionalPatternClause, PropertyPatternClause, Subpattern, SwitchExpression, SwitchExpressionArm, CasePatternSwitchLabel, CaseSwitchLabel, DiscardPattern, TuplePattern, ParenthesizedPattern, RelationalPattern, TypePattern, BinaryPattern, UnaryPattern, SlicePattern, RangeExpression, IndexExpression, WithExpression, AnonymousObjectMemberDeclarator, ArgumentList, BracketedArgumentList, Argument, NameEquals, TypeArgumentList, TypeParameterList, TypeParameterConstraintClause, ConstructorConstraint, ClassOrStructConstraint, TypeConstraint, BaseList, SimpleBaseType, PrimaryConstructorBaseType, AccessorList, AccessorDeclaration, ParameterList, BracketedParameterList, ArrowExpressionClause, EqualsValueClause, VariableDeclaration, VariableDeclarator, SeparatedSyntaxList, SyntaxList,
}
Expand description

C# element type

Variants§

§

Root

Root node of the syntax tree

§

CompilationUnit

Compilation unit (source file)

§

NamespaceDeclaration

Namespace declaration

§

UsingDirective

Using directive

§

ClassDeclaration

Class declaration

§

StructDeclaration

Struct declaration

§

InterfaceDeclaration

Interface declaration

§

EnumDeclaration

Enum declaration

§

DelegateDeclaration

Delegate declaration

§

MethodDeclaration

Method declaration

§

PropertyDeclaration

Property declaration

§

FieldDeclaration

Field declaration

§

EventDeclaration

Event declaration

§

IndexerDeclaration

Indexer declaration

§

ConstructorDeclaration

Constructor declaration

§

DestructorDeclaration

Destructor declaration

§

OperatorDeclaration

Operator declaration

§

ConversionOperatorDeclaration

Conversion operator declaration

§

Parameter

Parameter

§

TypeParameter

Type parameter

§

Constraint

Constraint

§

Attribute

Attribute

§

AttributeList

Attribute list

§

Block

Block statement

§

ExpressionStatement

Expression statement

§

IfStatement

If statement

§

SwitchStatement

Switch statement

§

WhileStatement

While statement

§

ForStatement

For statement

§

ForeachStatement

Foreach statement

§

DoStatement

Do-while statement

§

TryStatement

Try statement

§

CatchClause

Catch clause

§

FinallyClause

Finally clause

§

ThrowStatement

Throw statement

§

ReturnStatement

Return statement

§

BreakStatement

Break statement

§

ContinueStatement

Continue statement

§

GotoStatement

Goto statement

§

LabeledStatement

Labeled statement

§

LockStatement

Lock statement

§

UsingStatement

Using statement

§

FixedStatement

Fixed statement

§

UnsafeStatement

Unsafe statement

§

CheckedStatement

Checked statement

§

UncheckedStatement

Unchecked statement

§

YieldStatement

Yield statement

§

LocalDeclarationStatement

Local declaration statement

§

BinaryExpression

Binary expression

§

UnaryExpression

Unary expression

§

AssignmentExpression

Assignment expression

§

ConditionalExpression

Conditional expression (ternary)

§

InvocationExpression

Method invocation expression

§

MemberAccessExpression

Member access expression

§

ElementAccessExpression

Element access expression

§

CastExpression

Cast expression

§

AsExpression

As expression

§

IsExpression

Is expression

§

TypeOfExpression

Typeof expression

§

SizeOfExpression

Sizeof expression

§

DefaultExpression

Default value expression

§

LiteralExpression

Literal expression

§

ThisExpression

This expression

§

BaseExpression

Base expression

§

IdentifierName

Identifier name

§

QualifiedName

Qualified name

§

GenericName

Generic name

§

AliasQualifiedName

Alias qualified name

§

PredefinedType

Predefined type

§

ArrayType

Array type

§

PointerType

Pointer type

§

NullableType

Nullable type

§

TupleType

Tuple type

§

RefType

Ref type

§

ArrayCreationExpression

Array creation expression

§

ImplicitArrayCreationExpression

Implicit array creation expression

§

StackAllocArrayCreationExpression

Stack alloc array creation expression

§

ObjectCreationExpression

Object creation expression

§

AnonymousObjectCreationExpression

Anonymous object creation expression

§

ArrayInitializerExpression

Array initializer expression

§

CollectionInitializerExpression

Collection initializer expression

§

ComplexElementInitializerExpression

Complex element initializer expression

§

ObjectInitializerExpression

Object initializer expression

§

MemberInitializerExpression

Member initializer expression

§

LambdaExpression

Lambda expression

§

AnonymousMethodExpression

Anonymous method expression

§

QueryExpression

Query expression

§

QueryBody

Query body

§

FromClause

From clause

§

LetClause

Let clause

§

WhereClause

Where clause

§

JoinClause

Join clause

§

JoinIntoClause

Join into clause

§

OrderByClause

Order by clause

§

Ordering

Ordering

§

SelectClause

Select clause

§

GroupClause

Group clause

§

QueryContinuation

Query continuation

§

OmittedArraySizeExpression

Omitted array size expression

§

InterpolatedStringExpression

Interpolated string expression

§

InterpolatedStringText

Interpolated string text

§

Interpolation

Interpolation

§

InterpolationAlignmentClause

Interpolation alignment clause

§

InterpolationFormatClause

Interpolation format clause

§

GlobalStatement

Global statement

§

SimpleLambdaExpression

Simple lambda expression

§

ParenthesizedLambdaExpression

Parenthesized lambda expression

§

InitializerExpression

Initializer expression

§

ImplicitElementAccess

Implicit element access

§

PostfixUnaryExpression

Postfix unary expression

§

PrefixUnaryExpression

Prefix unary expression

§

AwaitExpression

Await expression

§

NameColon

Name colon

§

DeclarationExpression

Declaration expression

§

TupleExpression

Tuple expression

§

TupleElement

Tuple element

§

SingleVariableDesignation

Single variable designation

§

ParenthesizedVariableDesignation

Parenthesized variable designation

§

DiscardDesignation

Discard designation

§

RefExpression

Ref expression

§

RefTypeExpression

Ref type expression

§

RefValueExpression

Ref value expression

§

MakeRefExpression

Make ref expression

§

CheckedExpression

Checked expression

§

UncheckedExpression

Unchecked expression

§

DefaultLiteralExpression

Default literal expression

§

ConditionalAccessExpression

Conditional access expression

§

MemberBindingExpression

Member binding expression

§

ElementBindingExpression

Element binding expression

§

ImplicitStackAllocArrayCreationExpression

§

IsPatternExpression

§

ThrowExpression

§

WhenClause

§

ConstantPattern

§

DeclarationPattern

§

VarPattern

§

RecursivePattern

§

PositionalPatternClause

§

PropertyPatternClause

§

Subpattern

§

SwitchExpression

Switch expression

§

SwitchExpressionArm

Switch expression arm

§

CasePatternSwitchLabel

Case pattern switch label

§

CaseSwitchLabel

Case switch label

§

DiscardPattern

Discard pattern

§

TuplePattern

Tuple pattern

§

ParenthesizedPattern

Parenthesized pattern

§

RelationalPattern

Relational pattern

§

TypePattern

Type pattern

§

BinaryPattern

Binary pattern

§

UnaryPattern

Unary pattern

§

SlicePattern

Slice pattern

§

RangeExpression

Range expression

§

IndexExpression

Index expression

§

WithExpression

With expression

§

AnonymousObjectMemberDeclarator

Anonymous object member declarator

§

ArgumentList

Argument list

§

BracketedArgumentList

Bracketed argument list

§

Argument

Argument

§

NameEquals

Name equals

§

TypeArgumentList

Type argument list

§

TypeParameterList

Type parameter list

§

TypeParameterConstraintClause

Type parameter constraint clause

§

ConstructorConstraint

Constructor constraint

§

ClassOrStructConstraint

Class or struct constraint

§

TypeConstraint

Type constraint

§

BaseList

Base list

§

SimpleBaseType

Simple base type

§

PrimaryConstructorBaseType

Primary constructor base type

§

AccessorList

Accessor list

§

AccessorDeclaration

Accessor declaration

§

ParameterList

Parameter list

§

BracketedParameterList

Bracketed parameter list

§

ArrowExpressionClause

Arrow expression clause

§

EqualsValueClause

Equals value clause

§

VariableDeclaration

Variable declaration

§

VariableDeclarator

Variable declarator

§

SeparatedSyntaxList

Separated syntax list

§

SyntaxList

Syntax list

Trait Implementations§

Source§

impl Clone for CSharpElementType

Source§

fn clone(&self) -> CSharpElementType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CSharpElementType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CSharpElementType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl ElementType for CSharpElementType

Source§

type Role = UniversalElementRole

The associated role type for this element kind.
Source§

fn role(&self) -> Self::Role

Returns the general syntactic role of this element. Read more
Source§

fn is_role(&self, role: Self::Role) -> bool

Returns true if this element matches the specified language-specific role.
Source§

fn is_universal(&self, role: UniversalElementRole) -> bool

Returns true if this element matches the specified universal role.
Source§

fn is_root(&self) -> bool

Returns true if this element represents the root of the parsed tree. Read more
Source§

fn is_error(&self) -> bool

Returns true if this element represents an error condition. Read more
Source§

impl From<CSharpTokenType> for CSharpElementType

Source§

fn from(token: CSharpTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for CSharpElementType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for CSharpElementType

Source§

fn cmp(&self, other: &CSharpElementType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for CSharpElementType

Source§

fn eq(&self, other: &CSharpElementType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for CSharpElementType

Source§

fn partial_cmp(&self, other: &CSharpElementType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for CSharpElementType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for CSharpElementType

Source§

impl Eq for CSharpElementType

Source§

impl StructuralPartialEq for CSharpElementType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,