#[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
impl Clone for SyntaxKind
Source§fn clone(&self) -> SyntaxKind
fn clone(&self) -> SyntaxKind
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SyntaxKind
impl Debug for SyntaxKind
Source§impl Display for SyntaxKind
impl Display for SyntaxKind
Source§impl From<SyntaxKind> for SyntaxKind
impl From<SyntaxKind> for SyntaxKind
Source§fn from(v: SyntaxKind) -> Self
fn from(v: SyntaxKind) -> Self
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 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 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SyntaxKind
impl PartialEq for SyntaxKind
Source§impl PartialOrd for SyntaxKind
impl PartialOrd 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>>
impl Copy for SyntaxKind
impl Eq for SyntaxKind
impl StructuralPartialEq for SyntaxKind
Auto Trait Implementations§
impl Freeze for SyntaxKind
impl RefUnwindSafe for SyntaxKind
impl Send for SyntaxKind
impl Sync for SyntaxKind
impl Unpin 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> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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