Enum SyntaxKind

Source
#[repr(u16)]
pub enum SyntaxKind {
Show 167 variants Unknown, Unparsed, Whitespace, Comment, Version, Float, Integer, Ident, SingleQuote, DoubleQuote, OpenHeredoc, CloseHeredoc, ArrayTypeKeyword, BooleanTypeKeyword, FileTypeKeyword, FloatTypeKeyword, IntTypeKeyword, MapTypeKeyword, ObjectTypeKeyword, PairTypeKeyword, StringTypeKeyword, AfterKeyword, AliasKeyword, AsKeyword, CallKeyword, CommandKeyword, ElseKeyword, EnvKeyword, FalseKeyword, IfKeyword, InKeyword, ImportKeyword, InputKeyword, MetaKeyword, NoneKeyword, NullKeyword, ObjectKeyword, OutputKeyword, ParameterMetaKeyword, RuntimeKeyword, ScatterKeyword, StructKeyword, TaskKeyword, ThenKeyword, TrueKeyword, VersionKeyword, WorkflowKeyword, DirectoryTypeKeyword, HintsKeyword, RequirementsKeyword, OpenBrace, CloseBrace, OpenBracket, CloseBracket, Assignment, Colon, Comma, OpenParen, CloseParen, QuestionMark, Exclamation, Plus, Minus, LogicalOr, LogicalAnd, Asterisk, Exponentiation, Slash, Percent, Equal, NotEqual, LessEqual, GreaterEqual, Less, Greater, Dot, LiteralStringText, LiteralCommandText, PlaceholderOpen, RootNode, VersionStatementNode, ImportStatementNode, ImportAliasNode, StructDefinitionNode, TaskDefinitionNode, WorkflowDefinitionNode, UnboundDeclNode, BoundDeclNode, InputSectionNode, OutputSectionNode, CommandSectionNode, RequirementsSectionNode, RequirementsItemNode, TaskHintsSectionNode, WorkflowHintsSectionNode, TaskHintsItemNode, WorkflowHintsItemNode, WorkflowHintsObjectNode, WorkflowHintsObjectItemNode, WorkflowHintsArrayNode, RuntimeSectionNode, RuntimeItemNode, PrimitiveTypeNode, MapTypeNode, ArrayTypeNode, PairTypeNode, ObjectTypeNode, TypeRefNode, MetadataSectionNode, ParameterMetadataSectionNode, MetadataObjectItemNode, MetadataObjectNode, MetadataArrayNode, LiteralIntegerNode, LiteralFloatNode, LiteralBooleanNode, LiteralNoneNode, LiteralNullNode, LiteralStringNode, LiteralPairNode, LiteralArrayNode, LiteralMapNode, LiteralMapItemNode, LiteralObjectNode, LiteralObjectItemNode, LiteralStructNode, LiteralStructItemNode, LiteralHintsNode, LiteralHintsItemNode, LiteralInputNode, LiteralInputItemNode, LiteralOutputNode, LiteralOutputItemNode, ParenthesizedExprNode, NameRefExprNode, IfExprNode, LogicalNotExprNode, NegationExprNode, LogicalOrExprNode, LogicalAndExprNode, EqualityExprNode, InequalityExprNode, LessExprNode, LessEqualExprNode, GreaterExprNode, GreaterEqualExprNode, AdditionExprNode, SubtractionExprNode, MultiplicationExprNode, DivisionExprNode, ModuloExprNode, ExponentiationExprNode, CallExprNode, IndexExprNode, AccessExprNode, PlaceholderNode, PlaceholderSepOptionNode, PlaceholderDefaultOptionNode, PlaceholderTrueFalseOptionNode, ConditionalStatementNode, ScatterStatementNode, CallStatementNode, CallTargetNode, CallAliasNode, CallAfterNode, CallInputItemNode, MAX, // some variants omitted
}
Expand description

Represents the kind of syntax element (node or token) in a WDL concrete syntax tree (CST).

Nodes have at least one token child and represent a syntactic construct.

Tokens are terminal and represent any span of the source.

This enumeration is a union of all supported WDL tokens and nodes.

Variants§

§

Unknown

The token is unknown to WDL.

§

Unparsed

The token represents unparsed source.

Unparsed source occurs in WDL source files with unsupported versions.

§

Whitespace

A whitespace token.

§

Comment

A comment token.

§

Version

A WDL version token.

§

Float

A literal float token.

§

Integer

A literal integer token.

§

Ident

An identifier token.

§

SingleQuote

A single quote token.

§

DoubleQuote

A double quote token.

§

OpenHeredoc

An open heredoc token.

§

CloseHeredoc

A close heredoc token.

§

ArrayTypeKeyword

The Array type keyword token.

§

BooleanTypeKeyword

The Boolean type keyword token.

§

FileTypeKeyword

The File type keyword token.

§

FloatTypeKeyword

The Float type keyword token.

§

IntTypeKeyword

The Int type keyword token.

§

MapTypeKeyword

The Map type keyword token.

§

ObjectTypeKeyword

The Object type keyword token.

§

PairTypeKeyword

The Pair type keyword token.

§

StringTypeKeyword

The String type keyword token.

§

AfterKeyword

The after keyword token.

§

AliasKeyword

The alias keyword token.

§

AsKeyword

The as keyword token.

§

CallKeyword

The call keyword token.

§

CommandKeyword

The command keyword token.

§

ElseKeyword

The else keyword token.

§

EnvKeyword

The env keyword token.

§

FalseKeyword

The false keyword token.

§

IfKeyword

The if keyword token.

§

InKeyword

The in keyword token.

§

ImportKeyword

The import keyword token.

§

InputKeyword

The input keyword token.

§

MetaKeyword

The meta keyword token.

§

NoneKeyword

The None keyword.

§

NullKeyword

The null keyword token.

§

ObjectKeyword

The object keyword token.

§

OutputKeyword

The output keyword token.

§

ParameterMetaKeyword

The parameter_meta keyword token.

§

RuntimeKeyword

The runtime keyword token.

§

ScatterKeyword

The scatter keyword token.

§

StructKeyword

The struct keyword token.

§

TaskKeyword

The task keyword token.

§

ThenKeyword

The then keyword token.

§

TrueKeyword

The true keyword token.

§

VersionKeyword

The version keyword token.

§

WorkflowKeyword

The workflow keyword token.

§

DirectoryTypeKeyword

The 1.2 Directory type keyword token.

§

HintsKeyword

The 1.2 hints keyword token.

§

RequirementsKeyword

The 1.2 requirements keyword token.

§

OpenBrace

The { symbol token.

§

CloseBrace

The } symbol token.

§

OpenBracket

The [ symbol token.

§

CloseBracket

The ] symbol token.

§

Assignment

The = symbol token.

§

Colon

The : symbol token.

§

Comma

The , symbol token.

§

OpenParen

The ( symbol token.

§

CloseParen

The ) symbol token.

§

QuestionMark

The ? symbol token.

§

Exclamation

The ! symbol token.

§

Plus

The + symbol token.

§

Minus

The - symbol token.

§

LogicalOr

The || symbol token.

§

LogicalAnd

The && symbol token.

§

Asterisk

The * symbol token.

§

Exponentiation

The ** symbol token.

§

Slash

The / symbol token.

§

Percent

The % symbol token.

§

Equal

The == symbol token.

§

NotEqual

The != symbol token.

§

LessEqual

The <= symbol token.

§

GreaterEqual

The >= symbol token.

§

Less

The < symbol token.

§

Greater

The > symbol token.

§

Dot

The . symbol token.

§

LiteralStringText

A literal text part of a string.

§

LiteralCommandText

A literal text part of a command.

§

PlaceholderOpen

A placeholder open token.

§

RootNode

Represents the WDL document root node.

§

VersionStatementNode

Represents a version statement node.

§

ImportStatementNode

Represents an import statement node.

§

ImportAliasNode

Represents an import alias node.

§

StructDefinitionNode

Represents a struct definition node.

§

TaskDefinitionNode

Represents a task definition node.

§

WorkflowDefinitionNode

Represents a workflow definition node.

§

UnboundDeclNode

Represents an unbound declaration node.

§

BoundDeclNode

Represents a bound declaration node.

§

InputSectionNode

Represents an input section node.

§

OutputSectionNode

Represents an output section node.

§

CommandSectionNode

Represents a command section node.

§

RequirementsSectionNode

Represents a requirements section node.

§

RequirementsItemNode

Represents a requirements item node.

§

TaskHintsSectionNode

Represents a hints section node in a task.

§

WorkflowHintsSectionNode

Represents a hints section node in a workflow.

§

TaskHintsItemNode

Represents a hints item node in a task.

§

WorkflowHintsItemNode

Represents a hints item node in a workflow.

§

WorkflowHintsObjectNode

Represents a literal object in a workflow hints item value.

§

WorkflowHintsObjectItemNode

Represents an item in a workflow hints object.

§

WorkflowHintsArrayNode

Represents a literal array in a workflow hints item value.

§

RuntimeSectionNode

Represents a runtime section node.

§

RuntimeItemNode

Represents a runtime item node.

§

PrimitiveTypeNode

Represents a primitive type node.

§

MapTypeNode

Represents a map type node.

§

ArrayTypeNode

Represents an array type node.

§

PairTypeNode

Represents a pair type node.

§

ObjectTypeNode

Represents an object type node.

§

TypeRefNode

Represents a type reference node.

§

MetadataSectionNode

Represents a metadata section node.

§

ParameterMetadataSectionNode

Represents a parameter metadata section node.

§

MetadataObjectItemNode

Represents a metadata object item node.

§

MetadataObjectNode

Represents a metadata object node.

§

MetadataArrayNode

Represents a metadata array node.

§

LiteralIntegerNode

Represents a literal integer node.

§

LiteralFloatNode

Represents a literal float node.

§

LiteralBooleanNode

Represents a literal boolean node.

§

LiteralNoneNode

Represents a literal None node.

§

LiteralNullNode

Represents a literal null node.

§

LiteralStringNode

Represents a literal string node.

§

LiteralPairNode

Represents a literal pair node.

§

LiteralArrayNode

Represents a literal array node.

§

LiteralMapNode

Represents a literal map node.

§

LiteralMapItemNode

Represents a literal map item node.

§

LiteralObjectNode

Represents a literal object node.

§

LiteralObjectItemNode

Represents a literal object item node.

§

LiteralStructNode

Represents a literal struct node.

§

LiteralStructItemNode

Represents a literal struct item node.

§

LiteralHintsNode

Represents a literal hints node.

§

LiteralHintsItemNode

Represents a literal hints item node.

§

LiteralInputNode

Represents a literal input node.

§

LiteralInputItemNode

Represents a literal input item node.

§

LiteralOutputNode

Represents a literal output node.

§

LiteralOutputItemNode

Represents a literal output item node.

§

ParenthesizedExprNode

Represents a parenthesized expression node.

§

NameRefExprNode

Represents a name reference expression node.

§

IfExprNode

Represents an if expression node.

§

LogicalNotExprNode

Represents a logical not expression node.

§

NegationExprNode

Represents a negation expression node.

§

LogicalOrExprNode

Represents a logical OR expression node.

§

LogicalAndExprNode

Represents a logical AND expression node.

§

EqualityExprNode

Represents an equality expression node.

§

InequalityExprNode

Represents an inequality expression node.

§

LessExprNode

Represents a “less than” expression node.

§

LessEqualExprNode

Represents a “less than or equal to” expression node.

§

GreaterExprNode

Represents a “greater than” expression node.

§

GreaterEqualExprNode

Represents a “greater than or equal to” expression node.

§

AdditionExprNode

Represents an addition expression node.

§

SubtractionExprNode

Represents a subtraction expression node.

§

MultiplicationExprNode

Represents a multiplication expression node.

§

DivisionExprNode

Represents a division expression node.

§

ModuloExprNode

Represents a modulo expression node.

§

ExponentiationExprNode

Represents a exponentiation expr node.

§

CallExprNode

Represents a call expression node.’

§

IndexExprNode

Represents an index expression node.

§

AccessExprNode

Represents an an access expression node.

§

PlaceholderNode

Represents a placeholder node in a string literal.

§

PlaceholderSepOptionNode

Placeholder sep option node.

§

PlaceholderDefaultOptionNode

Placeholder default option node.

§

PlaceholderTrueFalseOptionNode

Placeholder true/false option node.

§

ConditionalStatementNode

Represents a conditional statement node.

§

ScatterStatementNode

Represents a scatter statement node.

§

CallStatementNode

Represents a call statement node.

§

CallTargetNode

Represents a call target node in a call statement.

§

CallAliasNode

Represents a call alias node in a call statement.

§

CallAfterNode

Represents an after clause node in a call statement.

§

CallInputItemNode

Represents a call input item node.

§

MAX

The exclusive maximum syntax kind value.

Implementations§

Source§

impl SyntaxKind

Source

pub fn is_symbolic(&self) -> bool

Returns whether the token is a symbolic SyntaxKind.

Generally speaking, symbolic SyntaxKinds have special meanings during parsing—they are not real elements of the grammar but rather an implementation detail.

Source

pub fn describe(&self) -> &'static str

Describes the syntax kind.

Source

pub fn is_trivia(&self) -> bool

Returns whether the SyntaxKind is trivia.

Trait Implementations§

Source§

impl Clone for SyntaxKind

Source§

fn clone(&self) -> SyntaxKind

Returns a copy 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 SyntaxKind

Source§

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

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

impl Hash for SyntaxKind

Source§

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

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 SyntaxKind

Source§

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

Source§

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

Source§

fn partial_cmp(&self, other: &SyntaxKind) -> 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 VariantArray for SyntaxKind

Source§

const VARIANTS: &'static [SyntaxKind]

Source§

impl Copy for SyntaxKind

Source§

impl Eq for SyntaxKind

Source§

impl StructuralPartialEq for SyntaxKind

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T