#[repr(u16)]
pub enum SyntaxKind {
Show 107 variants Error, Eof, Whitespace, Comment, StringLiteral, NumberLiteral, ColorLiteral, Identifier, DoubleArrow, PlusEqual, MinusEqual, StarEqual, DivEqual, LessEqual, GreaterEqual, EqualEqual, NotEqual, ColonEqual, FatArrow, Arrow, OrOr, AndAnd, LBrace, RBrace, LParent, RParent, LAngle, RAngle, LBracket, RBracket, Plus, Minus, Star, Div, Equal, Colon, Comma, Semicolon, Bang, Dot, Question, Dollar, At, Pipe, Percent, Document, Component, SubElement, Element, RepeatedElement, RepeatedIndex, ConditionalElement, CallbackDeclaration, Function, ArgumentDeclaration, ReturnType, CallbackConnection, PropertyDeclaration, PropertyAnimation, QualifiedName, DeclaredIdentifier, ChildrenPlaceholder, Binding, TwoWayBinding, BindingExpression, CodeBlock, ReturnStatement, Expression, StringTemplate, AtImageUrl, AtGradient, AtTr, TrContext, TrPlural, FunctionCallExpression, IndexExpression, SelfAssignment, ConditionalExpression, BinaryExpression, UnaryOpExpression, MemberAccess, Array, ObjectLiteral, ObjectMember, States, State, StatePropertyChange, Transitions, Transition, ExportsList, ExportSpecifier, ExportIdentifier, ExportName, ExportModule, ImportSpecifier, ImportIdentifierList, ImportIdentifier, ExternalName, InternalName, Type, ObjectType, ObjectTypeMember, ArrayType, StructDeclaration, EnumDeclaration, EnumValue, AtRustAttr,
}

Variants§

§

Error

§

Eof

§

Whitespace

Token

§

Comment

Token

§

StringLiteral

Token

§

NumberLiteral

Token

§

ColorLiteral

Token

§

Identifier

Token

§

DoubleArrow

Token

§

PlusEqual

Token

§

MinusEqual

Token

§

StarEqual

Token

§

DivEqual

Token

§

LessEqual

Token

§

GreaterEqual

Token

§

EqualEqual

Token

§

NotEqual

Token

§

ColonEqual

Token

§

FatArrow

Token

§

Arrow

Token

§

OrOr

Token

§

AndAnd

Token

§

LBrace

Token

§

RBrace

Token

§

LParent

Token

§

RParent

Token

§

LAngle

Token

§

RAngle

Token

§

LBracket

Token

§

RBracket

Token

§

Plus

Token

§

Minus

Token

§

Star

Token

§

Div

Token

§

Equal

Token

§

Colon

Token

§

Comma

Token

§

Semicolon

Token

§

Bang

Token

§

Dot

Token

§

Question

Token

§

Dollar

Token

§

At

Token

§

Pipe

Token

§

Percent

Token

§

Document

§

Component

DeclaredIdentifier := Element { ... }

§

SubElement

id := Element { ... }

§

Element

§

RepeatedElement

§

RepeatedIndex

§

ConditionalElement

§

CallbackDeclaration

§

Function

§

ArgumentDeclaration

§

ReturnType

-> type (but without the ->)

§

CallbackConnection

§

PropertyDeclaration

Declaration of a property.

§

PropertyAnimation

QualifiedName are the properties name

§

QualifiedName

wraps Identifiers, like Rectangle or SomeModule.SomeType

§

DeclaredIdentifier

Wraps single identifier (to disambiguate when there are other identifier in the production)

§

ChildrenPlaceholder

§

Binding

§

TwoWayBinding

xxx <=> something

§

BindingExpression

the right-hand-side of a binding

§

CodeBlock

§

ReturnStatement

§

Expression

§

StringTemplate

Concatenate the Expressions to make a string (usually expended from a template string)

§

AtImageUrl

@image-url("foo.png")

§

AtGradient

@linear-gradient(...) or @radial-gradient(...)

§

AtTr

@tr("foo", ...) // the string is a StringLiteral

§

TrContext

"foo" => in a AtTr node

§

TrPlural

| "foo" % n in a AtTr node

§

FunctionCallExpression

expression()

§

IndexExpression

expression[index]

§

SelfAssignment

expression += expression

§

ConditionalExpression

condition ? first : second

§

BinaryExpression

expr + expr

§

UnaryOpExpression

- expr

§

MemberAccess

(foo).bar, where foo is the base expression, and bar is a Identifier.

§

Array

[ ... ]

§

ObjectLiteral

{ foo: bar }

§

ObjectMember

foo: bar inside an ObjectLiteral

§

States

states: [...]

§

State

The DeclaredIdentifier is the state name. The Expression, if any, is the condition.

§

StatePropertyChange

binding within a state

§

Transitions

transitions: [...]

§

Transition

There is an identifier “in” or “out”, the DeclaredIdentifier is the state name

§

ExportsList

Export a set of declared components by name

§

ExportSpecifier

Declare the first identifier to be exported, either under its name or instead under the name of the second identifier.

§

ExportIdentifier

§

ExportName

§

ExportModule

export * from "foo". The import uri is stored as string literal.

§

ImportSpecifier

import { foo, bar, baz } from “blah”; The import uri is stored as string literal.

§

ImportIdentifierList

§

ImportIdentifier

{ foo as bar } or just { foo }

§

ExternalName

§

InternalName

§

Type

The representation of a type

§

ObjectType

{foo: string, bar: string}

§

ObjectTypeMember

foo: type inside an ObjectType

§

ArrayType

[ type ]

§

StructDeclaration

struct Foo { ... }

§

EnumDeclaration

enum Foo { bli, bla, blu }

§

EnumValue

The value is a Identifier

§

AtRustAttr

@rust-attr(...)

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

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

impl Display for SyntaxKind

source§

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

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

impl From<SyntaxKind> for SyntaxKind

source§

fn from(v: SyntaxKind) -> Self

Converts to this type from the input type.
source§

impl From<SyntaxKind> for u16

source§

fn from(enum_value: SyntaxKind) -> Self

Converts to this type from the input type.
source§

impl Hash for SyntaxKind

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 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) -> Selfwhere Self: Sized,

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

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

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

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

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

impl PartialEq<SyntaxKind> for SyntaxKind

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<SyntaxKind> 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

This method 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

This method 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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl TryFrom<u16> for SyntaxKind

§

type Error = TryFromPrimitiveError<SyntaxKind>

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

fn try_from(number: u16) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
source§

impl TryFromPrimitive for SyntaxKind

§

type Primitive = u16

source§

const NAME: &'static str = _

source§

fn try_from_primitive( number: Self::Primitive ) -> Result<Self, TryFromPrimitiveError<Self>>

source§

impl Copy for SyntaxKind

source§

impl Eq for SyntaxKind

source§

impl StructuralEq for SyntaxKind

source§

impl StructuralPartialEq for SyntaxKind

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.