#[repr(u16)]
pub enum SyntaxKind {
Show 107 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, Pipe = 43, Percent = 44, Document = 45, Component = 46, SubElement = 47, Element = 48, RepeatedElement = 49, RepeatedIndex = 50, ConditionalElement = 51, CallbackDeclaration = 52, Function = 53, ArgumentDeclaration = 54, ReturnType = 55, CallbackConnection = 56, PropertyDeclaration = 57, PropertyAnimation = 58, QualifiedName = 59, DeclaredIdentifier = 60, ChildrenPlaceholder = 61, Binding = 62, TwoWayBinding = 63, BindingExpression = 64, CodeBlock = 65, ReturnStatement = 66, Expression = 67, StringTemplate = 68, AtImageUrl = 69, AtGradient = 70, AtTr = 71, TrContext = 72, TrPlural = 73, FunctionCallExpression = 74, IndexExpression = 75, SelfAssignment = 76, ConditionalExpression = 77, BinaryExpression = 78, UnaryOpExpression = 79, MemberAccess = 80, Array = 81, ObjectLiteral = 82, ObjectMember = 83, States = 84, State = 85, StatePropertyChange = 86, Transitions = 87, Transition = 88, ExportsList = 89, ExportSpecifier = 90, ExportIdentifier = 91, ExportName = 92, ExportModule = 93, ImportSpecifier = 94, ImportIdentifierList = 95, ImportIdentifier = 96, ExternalName = 97, InternalName = 98, Type = 99, ObjectType = 100, ObjectTypeMember = 101, ArrayType = 102, StructDeclaration = 103, EnumDeclaration = 104, EnumValue = 105, AtRustAttr = 106,
}

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

§

Pipe = 43

Token

§

Percent = 44

Token

§

Document = 45

§

Component = 46

DeclaredIdentifier := Element { ... }

§

SubElement = 47

id := Element { ... }

§

Element = 48

§

RepeatedElement = 49

§

RepeatedIndex = 50

§

ConditionalElement = 51

§

CallbackDeclaration = 52

§

Function = 53

§

ArgumentDeclaration = 54

§

ReturnType = 55

-> type (but without the ->)

§

CallbackConnection = 56

§

PropertyDeclaration = 57

Declaration of a property.

§

PropertyAnimation = 58

QualifiedName are the properties name

§

QualifiedName = 59

wraps Identifiers, like Rectangle or SomeModule.SomeType

§

DeclaredIdentifier = 60

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

§

ChildrenPlaceholder = 61

§

Binding = 62

§

TwoWayBinding = 63

xxx <=> something

§

BindingExpression = 64

the right-hand-side of a binding

§

CodeBlock = 65

§

ReturnStatement = 66

§

Expression = 67

§

StringTemplate = 68

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

§

AtImageUrl = 69

@image-url("foo.png")

§

AtGradient = 70

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

§

AtTr = 71

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

§

TrContext = 72

"foo" => in a AtTr node

§

TrPlural = 73

| "foo" % n in a AtTr node

§

FunctionCallExpression = 74

expression()

§

IndexExpression = 75

expression[index]

§

SelfAssignment = 76

expression += expression

§

ConditionalExpression = 77

condition ? first : second

§

BinaryExpression = 78

expr + expr

§

UnaryOpExpression = 79

- expr

§

MemberAccess = 80

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

§

Array = 81

[ ... ]

§

ObjectLiteral = 82

{ foo: bar }

§

ObjectMember = 83

foo: bar inside an ObjectLiteral

§

States = 84

states: [...]

§

State = 85

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

§

StatePropertyChange = 86

binding within a state

§

Transitions = 87

transitions: [...]

§

Transition = 88

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

§

ExportsList = 89

Export a set of declared components by name

§

ExportSpecifier = 90

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

§

ExportIdentifier = 91

§

ExportName = 92

§

ExportModule = 93

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

§

ImportSpecifier = 94

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

§

ImportIdentifierList = 95

§

ImportIdentifier = 96

{ foo as bar } or just { foo }

§

ExternalName = 97

§

InternalName = 98

§

Type = 99

The representation of a type

§

ObjectType = 100

{foo: string, bar: string}

§

ObjectTypeMember = 101

foo: type inside an ObjectType

§

ArrayType = 102

[ type ]

§

StructDeclaration = 103

struct Foo { ... }

§

EnumDeclaration = 104

enum Foo { bli, bla, blu }

§

EnumValue = 105

The value is a Identifier

§

AtRustAttr = 106

@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) -> 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 + PartialOrd,

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

impl PartialEq 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 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

§

type Error = TryFromPrimitiveError<SyntaxKind>

source§

const NAME: &'static str = "SyntaxKind"

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

§

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§

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

§

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

§

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.