Enum SyntaxKind

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

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

§

CallbackDeclarationParameter = 53

§

Function = 54

§

ArgumentDeclaration = 55

§

ReturnType = 56

-> type (but without the ->)

§

CallbackConnection = 57

§

PropertyDeclaration = 58

Declaration of a property.

§

PropertyAnimation = 59

QualifiedName are the properties name

§

PropertyChangedCallback = 60

changed xxx => {...} where xxx is the DeclaredIdentifier

§

QualifiedName = 61

wraps Identifiers, like Rectangle or SomeModule.SomeType

§

DeclaredIdentifier = 62

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

§

ChildrenPlaceholder = 63

§

Binding = 64

§

TwoWayBinding = 65

xxx <=> something

§

BindingExpression = 66

the right-hand-side of a binding

§

CodeBlock = 67

§

ReturnStatement = 68

§

Expression = 69

§

StringTemplate = 70

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

§

AtImageUrl = 71

@image-url("foo.png")

§

AtGradient = 72

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

§

AtTr = 73

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

§

TrContext = 74

"foo" => in a AtTr node

§

TrPlural = 75

| "foo" % n in a AtTr node

§

FunctionCallExpression = 76

expression()

§

IndexExpression = 77

expression[index]

§

SelfAssignment = 78

expression += expression

§

ConditionalExpression = 79

condition ? first : second

§

BinaryExpression = 80

expr + expr

§

UnaryOpExpression = 81

- expr

§

MemberAccess = 82

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

§

Array = 83

[ ... ]

§

ObjectLiteral = 84

{ foo: bar }

§

ObjectMember = 85

foo: bar inside an ObjectLiteral

§

States = 86

states: [...]

§

State = 87

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

§

StatePropertyChange = 88

binding within a state

§

Transitions = 89

transitions: [...]

§

Transition = 90

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

§

ExportsList = 91

Export a set of declared components by name

§

ExportSpecifier = 92

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

§

ExportIdentifier = 93

§

ExportName = 94

§

ExportModule = 95

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

§

ImportSpecifier = 96

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

§

ImportIdentifierList = 97

§

ImportIdentifier = 98

{ foo as bar } or just { foo }

§

ExternalName = 99

§

InternalName = 100

§

Type = 101

The representation of a type

§

ObjectType = 102

{foo: string, bar: string}

§

ObjectTypeMember = 103

foo: type inside an ObjectType

§

ArrayType = 104

[ type ]

§

StructDeclaration = 105

struct Foo { ... }

§

EnumDeclaration = 106

enum Foo { bli, bla, blu }

§

EnumValue = 107

The value is a Identifier

§

AtRustAttr = 108

@rust-attr(...)

Trait Implementations§

Source§

impl Clone for SyntaxKind

Source§

fn clone(&self) -> SyntaxKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

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§

const 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 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§

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

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,