Skip to main content

DElementType

Enum DElementType 

Source
pub enum DElementType {
Show 196 variants Root, Module, Declaration, Statement, Expression, Type, Aggregate, Import, Class, Struct, Interface, Function, Block, IfStatement, WhileStatement, ForStatement, ReturnStatement, ExpressionStatement, Literal, ParenthesizedExpression, BinaryExpression, ModuleKeyword, ImportKeyword, PublicKeyword, PrivateKeyword, ProtectedKeyword, PackageKeyword, ExportKeyword, StaticKeyword, FinalKeyword, AbstractKeyword, OverrideKeyword, SynchronizedKeyword, ConstKeyword, ImmutableKeyword, InoutKeyword, SharedKeyword, ClassKeyword, StructKeyword, InterfaceKeyword, UnionKeyword, EnumKeyword, FunctionKeyword, DelegateKeyword, IfKeyword, ElseKeyword, WhileKeyword, ForKeyword, ForeachKeyword, DoKeyword, SwitchKeyword, CaseKeyword, DefaultKeyword, BreakKeyword, ContinueKeyword, ReturnKeyword, GotoKeyword, TryKeyword, CatchKeyword, FinallyKeyword, ThrowKeyword, ScopeKeyword, WithKeyword, SynchronizedKeyword2, AsmKeyword, MixinKeyword, TemplateKeyword, ThisKeyword, SuperKeyword, NullKeyword, TrueKeyword, FalseKeyword, CastKeyword, NewKeyword, DeleteKeyword, TypeofKeyword, TypeidKeyword, IsKeyword, InKeyword, OutKeyword, RefKeyword, LazyKeyword, AutoKeyword, AliasKeyword, TypedefKeyword, ExternKeyword, PureKeyword, NothrowKeyword, SafeKeyword, TrustedKeyword, SystemKeyword, NogcKeyword, PropertyKeyword, DisableKeyword, DeprecatedKeyword, VersionKeyword, DebugKeyword, UnitTestKeyword, InvariantKeyword, BodyKeyword, PragmaKeyword, AlignKeyword, VoidType, BoolType, ByteType, UbyteType, ShortType, UshortType, IntType, UintType, LongType, UlongType, CentType, UcentType, FloatType, DoubleType, RealType, IfloatType, IdoubleType, IrealType, CfloatType, CdoubleType, CrealType, CharType, WcharType, DcharType, StringType, WstringType, DstringType, Plus, Minus, Multiply, Divide, Modulo, BitwiseAnd, BitwiseOr, BitwiseXor, BitwiseNot, LeftShift, RightShift, UnsignedRightShift, Equal, NotEqual, Less, LessEqual, Greater, GreaterEqual, Identity, NotIdentity, Assign, PlusAssign, MinusAssign, MultiplyAssign, DivideAssign, ModuloAssign, BitwiseAndAssign, BitwiseOrAssign, BitwiseXorAssign, LeftShiftAssign, RightShiftAssign, UnsignedRightShiftAssign, ConcatenateAssign, LogicalAnd, LogicalOr, Increment, Decrement, Not, Question, Dollar, At, LeftParen, RightParen, LeftBracket, RightBracket, LeftBrace, RightBrace, Semicolon, Comma, Dot, DotDot, DotDotDot, Colon, Arrow, Hash, IntegerLiteral, FloatLiteral, StringLiteral, CharLiteral, Identifier, LineComment, BlockComment, NestedComment, Whitespace, Newline, Eof, Error,
}
Expand description

Element types for the D programming language.

Variants§

§

Root

The root of the parse tree.

§

Module

A module declaration.

§

Declaration

A declaration.

§

Statement

A statement.

§

Expression

An expression.

§

Type

A type.

§

Aggregate

An aggregate (class, struct, etc.).

§

Import

An import declaration.

§

Class

A class definition.

§

Struct

A struct definition.

§

Interface

An interface definition.

§

Function

A function definition.

§

Block

A block statement.

§

IfStatement

An if statement.

§

WhileStatement

A while statement.

§

ForStatement

A for statement.

§

ReturnStatement

A return statement.

§

ExpressionStatement

An expression statement.

§

Literal

A literal value.

§

ParenthesizedExpression

A parenthesized expression.

§

BinaryExpression

A binary expression.

§

ModuleKeyword

The module keyword.

§

ImportKeyword

The import keyword.

§

PublicKeyword

The public keyword.

§

PrivateKeyword

The private keyword.

§

ProtectedKeyword

The protected keyword.

§

PackageKeyword

The package keyword.

§

ExportKeyword

The export keyword.

§

StaticKeyword

The static keyword.

§

FinalKeyword

The final keyword.

§

AbstractKeyword

The abstract keyword.

§

OverrideKeyword

The override keyword.

§

SynchronizedKeyword

The synchronized keyword.

§

ConstKeyword

The const keyword.

§

ImmutableKeyword

The immutable keyword.

§

InoutKeyword

The inout keyword.

§

SharedKeyword

The shared keyword.

§

ClassKeyword

The class keyword.

§

StructKeyword

The struct keyword.

§

InterfaceKeyword

The interface keyword.

§

UnionKeyword

The union keyword.

§

EnumKeyword

The enum keyword.

§

FunctionKeyword

The function keyword.

§

DelegateKeyword

The delegate keyword.

§

IfKeyword

The if keyword.

§

ElseKeyword

The else keyword.

§

WhileKeyword

The while keyword.

§

ForKeyword

The for keyword.

§

ForeachKeyword

The foreach keyword.

§

DoKeyword

The do keyword.

§

SwitchKeyword

The switch keyword.

§

CaseKeyword

The case keyword.

§

DefaultKeyword

The default keyword.

§

BreakKeyword

The break keyword.

§

ContinueKeyword

The continue keyword.

§

ReturnKeyword

The return keyword.

§

GotoKeyword

The goto keyword.

§

TryKeyword

The try keyword.

§

CatchKeyword

The catch keyword.

§

FinallyKeyword

The finally keyword.

§

ThrowKeyword

The throw keyword.

§

ScopeKeyword

The scope keyword.

§

WithKeyword

The with keyword.

§

SynchronizedKeyword2

Another synchronized keyword variant.

§

AsmKeyword

The asm keyword.

§

MixinKeyword

The mixin keyword.

§

TemplateKeyword

The template keyword.

§

ThisKeyword

The this keyword.

§

SuperKeyword

The super keyword.

§

NullKeyword

The null keyword.

§

TrueKeyword

The true keyword.

§

FalseKeyword

The false keyword.

§

CastKeyword

The cast keyword.

§

NewKeyword

The new keyword.

§

DeleteKeyword

The delete keyword.

§

TypeofKeyword

The typeof keyword.

§

TypeidKeyword

The typeid keyword.

§

IsKeyword

The is keyword.

§

InKeyword

The in keyword.

§

OutKeyword

The out keyword.

§

RefKeyword

The ref keyword.

§

LazyKeyword

The lazy keyword.

§

AutoKeyword

The auto keyword.

§

AliasKeyword

The alias keyword.

§

TypedefKeyword

The typedef keyword.

§

ExternKeyword

The extern keyword.

§

PureKeyword

The pure keyword.

§

NothrowKeyword

The nothrow keyword.

§

SafeKeyword

The safe keyword.

§

TrustedKeyword

The trusted keyword.

§

SystemKeyword

The system keyword.

§

NogcKeyword

The nogc keyword.

§

PropertyKeyword

The property keyword.

§

DisableKeyword

The disable keyword.

§

DeprecatedKeyword

The deprecated keyword.

§

VersionKeyword

The version keyword.

§

DebugKeyword

The debug keyword.

§

UnitTestKeyword

The unittest keyword.

§

InvariantKeyword

The invariant keyword.

§

BodyKeyword

The body keyword.

§

PragmaKeyword

The pragma keyword.

§

AlignKeyword

The align keyword.

§

VoidType

The void type.

§

BoolType

The bool type.

§

ByteType

The byte type.

§

UbyteType

The ubyte type.

§

ShortType

The short type.

§

UshortType

The ushort type.

§

IntType

The int type.

§

UintType

The uint type.

§

LongType

The long type.

§

UlongType

The ulong type.

§

CentType

The cent type.

§

UcentType

The ucent type.

§

FloatType

The float type.

§

DoubleType

The double type.

§

RealType

The real type.

§

IfloatType

The ifloat type.

§

IdoubleType

The idouble type.

§

IrealType

The ireal type.

§

CfloatType

The cfloat type.

§

CdoubleType

The cdouble type.

§

CrealType

The creal type.

§

CharType

The char type.

§

WcharType

The wchar type.

§

DcharType

The dchar type.

§

StringType

The string type.

§

WstringType

The wstring type.

§

DstringType

The dstring type.

§

Plus

The + operator.

§

Minus

The - operator.

§

Multiply

The * operator.

§

Divide

The / operator.

§

Modulo

The % operator.

§

BitwiseAnd

The & operator.

§

BitwiseOr

The | operator.

§

BitwiseXor

The ^ operator.

§

BitwiseNot

The ~ operator.

§

LeftShift

The << operator.

§

RightShift

The >> operator.

§

UnsignedRightShift

The >>> operator.

§

Equal

The == operator.

§

NotEqual

The != operator.

§

Less

The < operator.

§

LessEqual

The <= operator.

§

Greater

The > operator.

§

GreaterEqual

The >= operator.

§

Identity

The is operator.

§

NotIdentity

The !is operator.

§

Assign

The = operator.

§

PlusAssign

The += operator.

§

MinusAssign

The -= operator.

§

MultiplyAssign

The *= operator.

§

DivideAssign

The /= operator.

§

ModuloAssign

The %= operator.

§

BitwiseAndAssign

The &= operator.

§

BitwiseOrAssign

The |= operator.

§

BitwiseXorAssign

The ^= operator.

§

LeftShiftAssign

The <<= operator.

§

RightShiftAssign

The >>= operator.

§

UnsignedRightShiftAssign

The >>>= operator.

§

ConcatenateAssign

The ~= operator.

§

LogicalAnd

The && operator.

§

LogicalOr

The || operator.

§

Increment

The ++ operator.

§

Decrement

The -- operator.

§

Not

The ! operator.

§

Question

The ? operator.

§

Dollar

The $ operator.

§

At

The @ operator.

§

LeftParen

Opening parenthesis (().

§

RightParen

Closing parenthesis ()).

§

LeftBracket

Opening bracket ([).

§

RightBracket

Closing bracket (]).

§

LeftBrace

Opening brace ({).

§

RightBrace

Closing brace (}).

§

Semicolon

Semicolon (;).

§

Comma

Comma (,).

§

Dot

Dot (.).

§

DotDot

Double dot (..).

§

DotDotDot

Triple dot (...).

§

Colon

Colon (:).

§

Arrow

Arrow (->).

§

Hash

Hash (#).

§

IntegerLiteral

An integer literal.

§

FloatLiteral

A floating-point literal.

§

StringLiteral

A string literal.

§

CharLiteral

A character literal.

§

Identifier

An identifier.

§

LineComment

A line comment.

§

BlockComment

A block comment.

§

NestedComment

A nested comment.

§

Whitespace

Whitespace.

§

Newline

A newline.

§

Eof

End of stream.

§

Error

An error.

Trait Implementations§

Source§

impl Clone for DElementType

Source§

fn clone(&self) -> DElementType

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 DElementType

Source§

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

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

impl<'de> Deserialize<'de> for DElementType

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 DElementType

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.
Source§

fn is_error(&self) -> bool

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

impl From<DTokenType> for DElementType

Source§

fn from(token: DTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for DElementType

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 PartialEq for DElementType

Source§

fn eq(&self, other: &DElementType) -> 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 Serialize for DElementType

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 DElementType

Source§

impl Eq for DElementType

Source§

impl StructuralPartialEq for DElementType

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

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