Skip to main content

DSyntaxKind

Enum DSyntaxKind 

Source
pub enum DSyntaxKind {
Show 183 variants Root, Module, Declaration, Statement, Expression, Type, Aggregate, Import, 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

D language syntax kinds

Variants§

§

Root

Root node of the syntax tree

§

Module

Module declaration

§

Declaration

Declaration statement

§

Statement

Statement

§

Expression

Expression

§

Type

type specification

§

Aggregate

Aggregate declaration

§

Import

Import declaration

§

ModuleKeyword

module keyword

§

ImportKeyword

import keyword

§

PublicKeyword

public keyword

§

PrivateKeyword

private keyword

§

ProtectedKeyword

protected keyword

§

PackageKeyword

package keyword

§

ExportKeyword

export keyword

§

StaticKeyword

static keyword

§

FinalKeyword

final keyword

§

AbstractKeyword

abstract keyword

§

OverrideKeyword

override keyword

§

SynchronizedKeyword

synchronized keyword

§

ConstKeyword

const keyword

§

ImmutableKeyword

immutable keyword

§

InoutKeyword

inout keyword

§

SharedKeyword

shared keyword

§

ClassKeyword

class keyword

§

StructKeyword

struct keyword

§

InterfaceKeyword

interface keyword

§

UnionKeyword

union keyword

§

EnumKeyword

enum keyword

§

FunctionKeyword

function keyword

§

DelegateKeyword

delegate keyword

§

IfKeyword

if keyword

§

ElseKeyword

else keyword

§

WhileKeyword

while keyword

§

ForKeyword

for keyword

§

ForeachKeyword

foreach keyword

§

DoKeyword

do keyword

§

SwitchKeyword

switch keyword

§

CaseKeyword

case keyword

§

DefaultKeyword

default keyword

§

BreakKeyword

break keyword

§

ContinueKeyword

continue keyword

§

ReturnKeyword

return keyword

§

GotoKeyword

goto keyword

§

TryKeyword

try keyword

§

CatchKeyword

catch keyword

§

FinallyKeyword

finally keyword

§

ThrowKeyword

throw keyword

§

ScopeKeyword

scope keyword

§

WithKeyword

with keyword

§

SynchronizedKeyword2

synchronized keyword (second occurrence)

§

AsmKeyword

asm keyword

§

MixinKeyword

mixin keyword

§

TemplateKeyword

template keyword

§

ThisKeyword

this keyword

§

SuperKeyword

super keyword

§

NullKeyword

null keyword

§

TrueKeyword

true keyword

§

FalseKeyword

false keyword

§

CastKeyword

cast keyword

§

NewKeyword

new keyword

§

DeleteKeyword

delete keyword

§

TypeofKeyword

typeof keyword

§

TypeidKeyword

typeid keyword

§

IsKeyword

is keyword

§

InKeyword

in keyword

§

OutKeyword

out keyword

§

RefKeyword

ref keyword

§

LazyKeyword

lazy keyword

§

AutoKeyword

auto keyword

§

AliasKeyword

alias keyword

§

TypedefKeyword

typedef keyword

§

ExternKeyword

extern keyword

§

PureKeyword

pure keyword

§

NothrowKeyword

nothrow keyword

§

SafeKeyword

safe keyword

§

TrustedKeyword

trusted keyword

§

SystemKeyword

system keyword

§

NogcKeyword

nogc keyword

§

PropertyKeyword

property keyword

§

DisableKeyword

disable keyword

§

DeprecatedKeyword

deprecated keyword

§

VersionKeyword

version keyword

§

DebugKeyword

debug keyword

§

UnitTestKeyword

unittest keyword

§

InvariantKeyword

invariant keyword

§

BodyKeyword

body keyword

§

PragmaKeyword

pragma keyword

§

AlignKeyword

align keyword

§

VoidType

void type

§

BoolType

bool type

§

ByteType

byte type

§

UbyteType

ubyte type

§

ShortType

short type

§

UshortType

ushort type

§

IntType

int type

§

UintType

uint type

§

LongType

long type

§

UlongType

ulong type

§

CentType

cent type

§

UcentType

ucent type

§

FloatType

float type

§

DoubleType

double type

§

RealType

real type

§

IfloatType

ifloat type

§

IdoubleType

idouble type

§

IrealType

ireal type

§

CfloatType

cfloat type

§

CdoubleType

cdouble type

§

CrealType

creal type

§

CharType

char type

§

WcharType

wchar type

§

DcharType

dchar type

§

StringType

string type

§

WstringType

wstring type

§

DstringType

dstring type

§

Plus

plus operator

§

Minus

minus operator

§

Multiply

multiply operator

§

Divide

divide operator

§

Modulo

modulo operator

§

BitwiseAnd

bitwise and operator

§

BitwiseOr

bitwise or operator

§

BitwiseXor

bitwise xor operator

§

BitwiseNot

bitwise not operator

§

LeftShift

left shift operator

§

RightShift

right shift operator

§

UnsignedRightShift

unsigned right shift operator

§

Equal

equal operator

§

NotEqual

not equal operator

§

Less

less than operator

§

LessEqual

less than or equal operator

§

Greater

greater than operator

§

GreaterEqual

greater than or equal operator

§

Identity

identity operator

§

NotIdentity

not identity operator

§

Assign

assign operator

§

PlusAssign

plus assign operator

§

MinusAssign

minus assign operator

§

MultiplyAssign

multiply assign operator

§

DivideAssign

divide assign operator

§

ModuloAssign

modulo assign operator

§

BitwiseAndAssign

bitwise and assign operator

§

BitwiseOrAssign

bitwise or assign operator

§

BitwiseXorAssign

bitwise xor assign operator

§

LeftShiftAssign

left shift assign operator

§

RightShiftAssign

right shift assign operator

§

UnsignedRightShiftAssign

unsigned right shift assign operator

§

ConcatenateAssign

concatenate assign operator

§

LogicalAnd

logical and operator

§

LogicalOr

logical or operator

§

Increment

increment operator

§

Decrement

decrement operator

§

Not

not operator

§

Question

question operator

§

Dollar

dollar operator

§

At

at operator

§

LeftParen

left parenthesis

§

RightParen

right parenthesis

§

LeftBracket

left bracket

§

RightBracket

right bracket

§

LeftBrace

left brace

§

RightBrace

right brace

§

Semicolon

semicolon

§

Comma

comma

§

Dot

dot

§

DotDot

dot dot

§

DotDotDot

dot dot dot

§

Colon

colon

§

Arrow

arrow

§

Hash

hash

§

IntegerLiteral

integer literal

§

FloatLiteral

float literal

§

StringLiteral

string literal

§

CharLiteral

char literal

§

Identifier

identifier

§

LineComment

line comment

§

BlockComment

block comment

§

NestedComment

nested comment

§

Whitespace

whitespace

§

Newline

newline

§

Eof

end of file

§

Error

error

Trait Implementations§

Source§

impl Clone for DSyntaxKind

Source§

fn clone(&self) -> DSyntaxKind

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 DSyntaxKind

Source§

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

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

impl<'de> Deserialize<'de> for DSyntaxKind

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 DSyntaxKind

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 Hash for DSyntaxKind

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 DSyntaxKind

Source§

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

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 TokenType for DSyntaxKind

Source§

fn is_ignored(&self) -> bool

Check if the syntax kind is trivia (whitespace or newline)

Source§

fn is_comment(&self) -> bool

Check if the syntax kind is a comment

Source§

fn is_whitespace(&self) -> bool

Check if the syntax kind is whitespace

Source§

const END_OF_STREAM: Self = Self::Eof

A constant representing the end of the input stream. Read more
Source§

type Role = UniversalTokenRole

The associated role type for this token kind.
Source§

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

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

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

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

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

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

fn is_error(&self) -> bool

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

fn is_end_of_stream(&self) -> bool

Returns true if this token represents the end of the input stream. Read more
Source§

impl Copy for DSyntaxKind

Source§

impl Eq for DSyntaxKind

Source§

impl StructuralPartialEq for DSyntaxKind

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>,