Skip to main content

SyntaxKind

Enum SyntaxKind 

Source
#[repr(u16)]
pub enum SyntaxKind {
Show 123 variants Error = 0, Eof = 1, Whitespace = 2, Comment = 3, StringLiteral = 4, NumberLiteral = 5, ColorLiteral = 6, Identifier = 7, DoubleArrow = 8, DoubleLess = 9, PlusEqual = 10, MinusEqual = 11, StarEqual = 12, DivEqual = 13, LessEqual = 14, GreaterEqual = 15, EqualEqual = 16, NotEqual = 17, ColonEqual = 18, FatArrow = 19, Arrow = 20, OrOr = 21, AndAnd = 22, LBrace = 23, RBrace = 24, LParent = 25, RParent = 26, LAngle = 27, RAngle = 28, LBracket = 29, RBracket = 30, Plus = 31, Minus = 32, Star = 33, Div = 34, Equal = 35, Colon = 36, Comma = 37, Semicolon = 38, Bang = 39, Dot = 40, Question = 41, Dollar = 42, At = 43, Pipe = 44, Percent = 45, Document = 46, Component = 47, SubElement = 48, Element = 49, RepeatedElement = 50, RepeatedIndex = 51, ConditionalElement = 52, MatchElement = 53, MatchCase = 54, WildcardMatchCase = 55, CallbackDeclaration = 56, CallbackDeclarationParameter = 57, Function = 58, ArgumentDeclaration = 59, ReturnType = 60, CallbackConnection = 61, PropertyDeclaration = 62, PropertyDeprecation = 63, ShadowableAttribute = 64, PropertyAnimation = 65, PropertyChangedCallback = 66, QualifiedName = 67, DeclaredIdentifier = 68, ChildrenPlaceholder = 69, SlotAssignment = 70, SlotForwarding = 71, Binding = 72, TwoWayBinding = 73, ImplementStatement = 74, BindingExpression = 75, CodeBlock = 76, LetStatement = 77, ReturnStatement = 78, Expression = 79, StringTemplate = 80, AtImageUrl = 81, AtGradient = 82, AtTr = 83, AtMarkdown = 84, SlotDeclaration = 85, TrContext = 86, TrPlural = 87, AtKeys = 88, FunctionCallExpression = 89, IndexExpression = 90, SelfAssignment = 91, ConditionalExpression = 92, BinaryExpression = 93, UnaryOpExpression = 94, MemberAccess = 95, Array = 96, ObjectLiteral = 97, ObjectMember = 98, States = 99, State = 100, StatePropertyChange = 101, Transitions = 102, Transition = 103, ExportsList = 104, ExportSpecifier = 105, ExportIdentifier = 106, ExportName = 107, ExportModule = 108, ImportSpecifier = 109, ImportIdentifierList = 110, ImportIdentifier = 111, ExternalName = 112, InternalName = 113, Type = 114, ObjectType = 115, ObjectTypeMember = 116, ArrayType = 117, StructDeclaration = 118, EnumDeclaration = 119, EnumValue = 120, AtRustAttr = 121, Closure = 122,
}

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

§

DoubleLess = 9

Token

§

PlusEqual = 10

Token

§

MinusEqual = 11

Token

§

StarEqual = 12

Token

§

DivEqual = 13

Token

§

LessEqual = 14

Token

§

GreaterEqual = 15

Token

§

EqualEqual = 16

Token

§

NotEqual = 17

Token

§

ColonEqual = 18

Token

§

FatArrow = 19

Token

§

Arrow = 20

Token

§

OrOr = 21

Token

§

AndAnd = 22

Token

§

LBrace = 23

Token

§

RBrace = 24

Token

§

LParent = 25

Token

§

RParent = 26

Token

§

LAngle = 27

Token

§

RAngle = 28

Token

§

LBracket = 29

Token

§

RBracket = 30

Token

§

Plus = 31

Token

§

Minus = 32

Token

§

Star = 33

Token

§

Div = 34

Token

§

Equal = 35

Token

§

Colon = 36

Token

§

Comma = 37

Token

§

Semicolon = 38

Token

§

Bang = 39

Token

§

Dot = 40

Token

§

Question = 41

Token

§

Dollar = 42

Token

§

At = 43

Token

§

Pipe = 44

Token

§

Percent = 45

Token

§

Document = 46

§

Component = 47

DeclaredIdentifier := Element { ... }

§

SubElement = 48

id := Element { ... }

§

Element = 49

§

RepeatedElement = 50

§

RepeatedIndex = 51

§

ConditionalElement = 52

§

MatchElement = 53

match (foo) { 1: Elem { } }

§

MatchCase = 54

1: Elem { }

§

WildcardMatchCase = 55

*: Elem { }

§

CallbackDeclaration = 56

§

CallbackDeclarationParameter = 57

§

Function = 58

§

ArgumentDeclaration = 59

§

ReturnType = 60

-> type (but without the ->)

§

CallbackConnection = 61

§

PropertyDeclaration = 62

Declaration of a property.

§

PropertyDeprecation = 63

@deprecated or @deprecated("message") prefixing a member declaration. The optional message is a StringLiteral token child.

§

ShadowableAttribute = 64

@shadowable prefixing a property, callback or function declaration: a component inheriting from this one may declare a member of the same name, shadowing this one.

§

PropertyAnimation = 65

QualifiedName are the properties name

§

PropertyChangedCallback = 66

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

§

QualifiedName = 67

wraps Identifiers, like Rectangle or SomeModule.SomeType

§

DeclaredIdentifier = 68

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

§

ChildrenPlaceholder = 69

§

SlotAssignment = 70

§

SlotForwarding = 71

§

Binding = 72

§

TwoWayBinding = 73

xxx <=> something

§

ImplementStatement = 74

implement Interface <=> target;

§

BindingExpression = 75

the right-hand-side of a binding

§

CodeBlock = 76

§

LetStatement = 77

§

ReturnStatement = 78

§

Expression = 79

§

StringTemplate = 80

Concatenate the children Expressions and StringLiteral to make a string

§

AtImageUrl = 81

@image-url("foo.png")

§

AtGradient = 82

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

§

AtTr = 83

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

§

AtMarkdown = 84

§

SlotDeclaration = 85

slot header;

§

TrContext = 86

"foo" => in a AtTr node

§

TrPlural = 87

| "foo" % n in a AtTr node

§

AtKeys = 88

@keys(...)

§

FunctionCallExpression = 89

expression()

§

IndexExpression = 90

expression[index]

§

SelfAssignment = 91

expression += expression

§

ConditionalExpression = 92

condition ? first : second

§

BinaryExpression = 93

expr + expr

§

UnaryOpExpression = 94

- expr

§

MemberAccess = 95

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

§

Array = 96

[ ... ]

§

ObjectLiteral = 97

{ foo: bar }

§

ObjectMember = 98

foo: bar inside an ObjectLiteral

§

States = 99

states: [...]

§

State = 100

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

§

StatePropertyChange = 101

binding within a state

§

Transitions = 102

transitions: [...]

§

Transition = 103

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

§

ExportsList = 104

Export a set of declared components by name

§

ExportSpecifier = 105

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

§

ExportIdentifier = 106

§

ExportName = 107

§

ExportModule = 108

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

§

ImportSpecifier = 109

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

§

ImportIdentifierList = 110

§

ImportIdentifier = 111

{ foo as bar } or just { foo }

§

ExternalName = 112

§

InternalName = 113

§

Type = 114

The representation of a type

§

ObjectType = 115

{foo: string, bar: string}

§

ObjectTypeMember = 116

foo: type or foo: type = default-value inside an ObjectType

§

ArrayType = 117

[ type ]

§

StructDeclaration = 118

struct Foo { ... }

§

EnumDeclaration = 119

enum Foo { bli, bla, blu }

§

EnumValue = 120

The value is a Identifier

§

AtRustAttr = 121

@rust-attr(...)

§

Closure = 122

(x) => x > 0

Trait Implementations§

Source§

impl Clone for SyntaxKind

Source§

fn clone(&self) -> SyntaxKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SyntaxKind

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 Eq for SyntaxKind

Source§

impl From<SyntaxKind> for u16

Source§

fn from(enum_value: SyntaxKind) -> Self

Converts to this type from the input type.
Source§

impl From<SyntaxKind> for SyntaxKind

Source§

fn from(v: 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 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

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

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

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

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for SyntaxKind

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 (const: unstable) · 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 StructuralPartialEq for SyntaxKind

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

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> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
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<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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.