#[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
impl Clone for SyntaxKind
Source§fn clone(&self) -> SyntaxKind
fn clone(&self) -> SyntaxKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SyntaxKind
Source§impl Debug for SyntaxKind
impl Debug for SyntaxKind
Source§impl Display for SyntaxKind
impl Display for SyntaxKind
impl Eq for SyntaxKind
Source§impl From<SyntaxKind> for u16
impl From<SyntaxKind> for u16
Source§fn from(enum_value: SyntaxKind) -> Self
fn from(enum_value: SyntaxKind) -> Self
Source§impl From<SyntaxKind> for SyntaxKind
impl From<SyntaxKind> for SyntaxKind
Source§fn from(v: SyntaxKind) -> Self
fn from(v: SyntaxKind) -> Self
Source§impl Hash for SyntaxKind
impl Hash for SyntaxKind
Source§impl Ord for SyntaxKind
impl Ord for SyntaxKind
Source§fn cmp(&self, other: &SyntaxKind) -> Ordering
fn cmp(&self, other: &SyntaxKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SyntaxKind
impl PartialEq for SyntaxKind
Source§impl PartialOrd for SyntaxKind
impl PartialOrd for SyntaxKind
impl StructuralPartialEq for SyntaxKind
Source§impl TryFrom<u16> for SyntaxKind
impl TryFrom<u16> for SyntaxKind
Source§type Error = TryFromPrimitiveError<SyntaxKind>
type Error = TryFromPrimitiveError<SyntaxKind>
Source§impl TryFromPrimitive for SyntaxKind
impl TryFromPrimitive for SyntaxKind
const NAME: &'static str = "SyntaxKind"
type Primitive = u16
type Error = TryFromPrimitiveError<SyntaxKind>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Freeze for SyntaxKind
impl RefUnwindSafe for SyntaxKind
impl Send for SyntaxKind
impl Sync for SyntaxKind
impl Unpin for SyntaxKind
impl UnsafeUnpin for SyntaxKind
impl UnwindSafe for SyntaxKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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