Enum SyntaxKind

Source
#[repr(u16)]
pub enum SyntaxKind {
Show 96 variants Error = 0, Eof = 1, Whitespace = 2, Comment = 3, StringLiteral = 4, NumberLiteral = 5, ColorLiteral = 6, Identifier = 7, DoubleArrow = 8, PlusEqual = 9, MinusEqual = 10, StarEqual = 11, DivEqual = 12, LessEqual = 13, GreaterEqual = 14, EqualEqual = 15, NotEqual = 16, ColonEqual = 17, FatArrow = 18, Arrow = 19, OrOr = 20, AndAnd = 21, LBrace = 22, RBrace = 23, LParent = 24, RParent = 25, LAngle = 26, RAngle = 27, LBracket = 28, RBracket = 29, Plus = 30, Minus = 31, Star = 32, Div = 33, Equal = 34, Colon = 35, Comma = 36, Semicolon = 37, Bang = 38, Dot = 39, Question = 40, Dollar = 41, At = 42, Document = 43, Component = 44, SubElement = 45, Element = 46, RepeatedElement = 47, RepeatedIndex = 48, ConditionalElement = 49, CallbackDeclaration = 50, ReturnType = 51, CallbackConnection = 52, PropertyDeclaration = 53, PropertyAnimation = 54, QualifiedName = 55, DeclaredIdentifier = 56, ChildrenPlaceholder = 57, Binding = 58, TwoWayBinding = 59, BindingExpression = 60, CodeBlock = 61, ReturnStatement = 62, Expression = 63, StringTemplate = 64, AtImageUrl = 65, AtLinearGradient = 66, FunctionCallExpression = 67, IndexExpression = 68, SelfAssignment = 69, ConditionalExpression = 70, BinaryExpression = 71, UnaryOpExpression = 72, MemberAccess = 73, Array = 74, ObjectLiteral = 75, ObjectMember = 76, States = 77, State = 78, StatePropertyChange = 79, Transitions = 80, Transition = 81, ExportsList = 82, ExportSpecifier = 83, ExportIdentifier = 84, ExportName = 85, ImportSpecifier = 86, ImportIdentifierList = 87, ImportIdentifier = 88, ExternalName = 89, InternalName = 90, Type = 91, ObjectType = 92, ObjectTypeMember = 93, ArrayType = 94, StructDeclaration = 95,
}

Variants§

§

Error = 0

§

Eof = 1

§

Whitespace = 2

Token

§

Comment = 3

Token

§

StringLiteral = 4

Token

§

NumberLiteral = 5

Token

§

ColorLiteral = 6

Token

§

Identifier = 7

Token

§

DoubleArrow = 8

Token

§

PlusEqual = 9

Token

§

MinusEqual = 10

Token

§

StarEqual = 11

Token

§

DivEqual = 12

Token

§

LessEqual = 13

Token

§

GreaterEqual = 14

Token

§

EqualEqual = 15

Token

§

NotEqual = 16

Token

§

ColonEqual = 17

Token

§

FatArrow = 18

Token

§

Arrow = 19

Token

§

OrOr = 20

Token

§

AndAnd = 21

Token

§

LBrace = 22

Token

§

RBrace = 23

Token

§

LParent = 24

Token

§

RParent = 25

Token

§

LAngle = 26

Token

§

RAngle = 27

Token

§

LBracket = 28

Token

§

RBracket = 29

Token

§

Plus = 30

Token

§

Minus = 31

Token

§

Star = 32

Token

§

Div = 33

Token

§

Equal = 34

Token

§

Colon = 35

Token

§

Comma = 36

Token

§

Semicolon = 37

Token

§

Bang = 38

Token

§

Dot = 39

Token

§

Question = 40

Token

§

Dollar = 41

Token

§

At = 42

Token

§

Document = 43

§

Component = 44

DeclaredIdentifier := Element { ... }

§

SubElement = 45

id := Element { ... }

§

Element = 46

§

RepeatedElement = 47

§

RepeatedIndex = 48

§

ConditionalElement = 49

§

CallbackDeclaration = 50

§

ReturnType = 51

-> type (but without the ->)

§

CallbackConnection = 52

§

PropertyDeclaration = 53

Declaration of a property.

§

PropertyAnimation = 54

QualifiedName are the properties name

§

QualifiedName = 55

wraps Identifiers, like Rectangle or SomeModule.SomeType

§

DeclaredIdentifier = 56

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

§

ChildrenPlaceholder = 57

§

Binding = 58

§

TwoWayBinding = 59

xxx <=> something

§

BindingExpression = 60

the right-hand-side of a binding

§

CodeBlock = 61

§

ReturnStatement = 62

§

Expression = 63

§

StringTemplate = 64

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

§

AtImageUrl = 65

@image-url("foo.png")

§

AtLinearGradient = 66

@linear-gradient(...)

§

FunctionCallExpression = 67

expression()

§

IndexExpression = 68

expression[index]

§

SelfAssignment = 69

expression += expression

§

ConditionalExpression = 70

condition ? first : second

§

BinaryExpression = 71

expr + expr

§

UnaryOpExpression = 72

- expr

§

MemberAccess = 73

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

§

Array = 74

[ ... ]

§

ObjectLiteral = 75

{ foo: bar }

§

ObjectMember = 76

foo: bar inside an ObjectLiteral

§

States = 77

states: [...]

§

State = 78

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

§

StatePropertyChange = 79

binding within a state

§

Transitions = 80

transitions: [...]

§

Transition = 81

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

§

ExportsList = 82

Export a set of declared components by name

§

ExportSpecifier = 83

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

§

ExportIdentifier = 84

§

ExportName = 85

§

ImportSpecifier = 86

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

§

ImportIdentifierList = 87

§

ImportIdentifier = 88

{ foo as bar } or just { foo }

§

ExternalName = 89

§

InternalName = 90

§

Type = 91

The representation of a type

§

ObjectType = 92

{foo: string, bar: string}

§

ObjectTypeMember = 93

foo: type inside an ObjectType

§

ArrayType = 94

[ type ]

§

StructDeclaration = 95

`struct Foo := { … }

Trait Implementations§

Source§

impl Clone for SyntaxKind

Source§

fn clone(&self) -> SyntaxKind

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 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 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 TryFrom<u16> for SyntaxKind

Source§

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

Source§

const NAME: &'static str = "SyntaxKind"

Source§

type Primitive = u16

Source§

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

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

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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,