#[non_exhaustive]#[repr(u8)]pub enum SyntaxKind {
Show 40 variants
SimpleMessage = 0,
ComplexMessage = 1,
InputDeclaration = 2,
LocalDeclaration = 3,
QuotedPattern = 4,
Pattern = 5,
Matcher = 6,
Variant = 7,
Expression = 8,
MarkupOpen = 9,
MarkupStandalone = 10,
MarkupClose = 11,
Function = 12,
Option = 13,
Attribute = 14,
Variable = 15,
Identifier = 16,
QuotedLiteral = 17,
Text = 18,
Escape = 19,
LiteralText = 20,
UnquotedLiteral = 21,
Name = 22,
Star = 23,
KwInput = 24,
KwLocal = 25,
KwMatch = 26,
LBrace = 27,
RBrace = 28,
LBrace2 = 29,
RBrace2 = 30,
Pipe = 31,
Dollar = 32,
Colon = 33,
Hash = 34,
Slash = 35,
At = 36,
Equals = 37,
Trivia = 38,
Error = 39,
}Expand description
What a node or token is.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SimpleMessage = 0
Root of a simple message: one SyntaxKind::Pattern.
ComplexMessage = 1
Root of a complex message: declarations, then a body.
InputDeclaration = 2
.input {$name …}.
LocalDeclaration = 3
.local $name = {…}.
QuotedPattern = 4
{{ pattern }}.
Pattern = 5
Text and placeholders.
Matcher = 6
.match selectors variants.
Variant = 7
Keys and a quoted pattern.
Expression = 8
{operand :function @attribute}.
MarkupOpen = 9
{#name …}.
MarkupStandalone = 10
{#name … /}.
MarkupClose = 11
{/name …}.
Function = 12
:identifier options.
Option = 13
identifier = value.
Attribute = 14
@identifier [= literal].
Variable = 15
$name.
Identifier = 16
[namespace :] name.
QuotedLiteral = 17
|…|.
Text = 18
A run of text characters in a pattern (no escapes).
Escape = 19
A two-character escape sequence: \\, \{, \| or \}.
LiteralText = 20
A run of characters inside a quoted literal (no escapes).
UnquotedLiteral = 21
An unquoted literal.
Name = 22
A name (of a variable, or one part of an identifier).
Star = 23
The catch-all key *.
KwInput = 24
.input.
KwLocal = 25
.local.
KwMatch = 26
.match.
LBrace = 27
{.
RBrace = 28
}.
LBrace2 = 29
{{.
RBrace2 = 30
}}.
Pipe = 31
|.
Dollar = 32
$.
Colon = 33
: (function sigil or namespace separator).
Hash = 34
#.
Slash = 35
/ (markup-close sigil or standalone marker).
At = 36
@.
Equals = 37
=.
Trivia = 38
Whitespace and bidi marks outside text and literals.
Error = 39
Input the parser could not use (a syntax error was reported for it).