Enum i_slint_compiler::parser::SyntaxKind

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

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

§

PropertyChangedCallback = 59

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

§

QualifiedName = 60

wraps Identifiers, like Rectangle or SomeModule.SomeType

§

DeclaredIdentifier = 61

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

§

ChildrenPlaceholder = 62

§

Binding = 63

§

TwoWayBinding = 64

xxx <=> something

§

BindingExpression = 65

the right-hand-side of a binding

§

CodeBlock = 66

§

ReturnStatement = 67

§

Expression = 68

§

StringTemplate = 69

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

§

AtImageUrl = 70

@image-url("foo.png")

§

AtGradient = 71

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

§

AtTr = 72

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

§

TrContext = 73

"foo" => in a AtTr node

§

TrPlural = 74

| "foo" % n in a AtTr node

§

FunctionCallExpression = 75

expression()

§

IndexExpression = 76

expression[index]

§

SelfAssignment = 77

expression += expression

§

ConditionalExpression = 78

condition ? first : second

§

BinaryExpression = 79

expr + expr

§

UnaryOpExpression = 80

- expr

§

MemberAccess = 81

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

§

Array = 82

[ ... ]

§

ObjectLiteral = 83

{ foo: bar }

§

ObjectMember = 84

foo: bar inside an ObjectLiteral

§

States = 85

states: [...]

§

State = 86

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

§

StatePropertyChange = 87

binding within a state

§

Transitions = 88

transitions: [...]

§

Transition = 89

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

§

ExportsList = 90

Export a set of declared components by name

§

ExportSpecifier = 91

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

§

ExportIdentifier = 92

§

ExportName = 93

§

ExportModule = 94

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

§

ImportSpecifier = 95

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

§

ImportIdentifierList = 96

§

ImportIdentifier = 97

{ foo as bar } or just { foo }

§

ExternalName = 98

§

InternalName = 99

§

Type = 100

The representation of a type

§

ObjectType = 101

{foo: string, bar: string}

§

ObjectTypeMember = 102

foo: type inside an ObjectType

§

ArrayType = 103

[ type ]

§

StructDeclaration = 104

struct Foo { ... }

§

EnumDeclaration = 105

enum Foo { bli, bla, blu }

§

EnumValue = 106

The value is a Identifier

§

AtRustAttr = 107

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

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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,

§

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§

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.