#[repr(u16)]pub enum SyntaxKind {
Show 100 variants
Whitespace = 0,
LineComment = 1,
BlockComment = 2,
Ident = 3,
DelimitedIdent = 4,
SingleQuotedString = 5,
DoubleQuotedString = 6,
TripleQuotedString = 7,
Integer = 8,
Decimal = 9,
LongNumber = 10,
Date = 11,
DateTime = 12,
Time = 13,
DollarIdent = 14,
MetadataPrefix = 15,
LParen = 16,
RParen = 17,
LBrace = 18,
RBrace = 19,
LBracket = 20,
RBracket = 21,
Comma = 22,
Semicolon = 23,
Colon = 24,
Dot = 25,
DotDot = 26,
Arrow = 27,
Eq = 28,
EqEq = 29,
Neq = 30,
Tilde = 31,
NotTilde = 32,
Lt = 33,
Le = 34,
Gt = 35,
Ge = 36,
Shl = 37,
Shr = 38,
Plus = 39,
Minus = 40,
Star = 41,
Slash = 42,
Amp = 43,
Pipe = 44,
Percent = 45,
Unknown = 46,
SourceFile = 47,
Metadata = 48,
ConceptMap = 49,
ConceptMapPrefix = 50,
ConceptMapUnmapped = 51,
ConceptMapEntry = 52,
ConceptMapCode = 53,
ConceptMapRelation = 54,
MapDeclaration = 55,
UsesDeclaration = 56,
UsesAlias = 57,
ImportsDeclaration = 58,
ConstantDeclaration = 59,
Group = 60,
ParameterList = 61,
Parameter = 62,
TypeAnnotation = 63,
ExtendsClause = 64,
TypeMode = 65,
RuleBlock = 66,
Rule = 67,
SourceList = 68,
Source = 69,
Cardinality = 70,
DefaultClause = 71,
SourceListMode = 72,
Alias = 73,
WhereClause = 74,
CheckClause = 75,
LogClause = 76,
TargetList = 77,
Target = 78,
Transform = 79,
TargetListMode = 80,
Invocation = 81,
ArgumentList = 82,
DependentClause = 83,
IdentityList = 84,
RuleName = 85,
QualifiedName = 86,
Literal = 87,
Quantity = 88,
NameRef = 89,
ExternalConstant = 90,
ParenExpr = 91,
MemberExpr = 92,
CallExpr = 93,
IndexExpr = 94,
PrefixExpr = 95,
BinaryExpr = 96,
TypeExpr = 97,
NullLiteral = 98,
Error = 99,
}Expand description
Every token and node kind in an FML syntax tree.
FML keywords are contextual: source, group, where and the rest are also valid element
names. The lexer therefore produces SyntaxKind::Ident for every word and the parser decides
what a word means from where it appears.
Variants§
Whitespace = 0
LineComment = 1
BlockComment = 2
Ident = 3
DelimitedIdent = 4
`name`
SingleQuotedString = 5
'text'
DoubleQuotedString = 6
"text"
TripleQuotedString = 7
""" … """, used for markdown metadata values.
Integer = 8
Decimal = 9
LongNumber = 10
10L
Date = 11
@2024-01-01
DateTime = 12
@2024-01-01T10:00:00Z
Time = 13
@T10:00
DollarIdent = 14
$this, $index, $total
MetadataPrefix = 15
/// at the start of a metadata line.
LParen = 16
RParen = 17
LBrace = 18
RBrace = 19
LBracket = 20
RBracket = 21
Comma = 22
Semicolon = 23
Colon = 24
Dot = 25
DotDot = 26
..
Arrow = 27
->
Eq = 28
=
EqEq = 29
==
Neq = 30
!=
Tilde = 31
~
NotTilde = 32
!~
Lt = 33
Le = 34
Gt = 35
Ge = 36
Shl = 37
<<
Shr = 38
>>
Plus = 39
Minus = 40
Star = 41
Slash = 42
Amp = 43
Pipe = 44
Percent = 45
Unknown = 46
A character the lexer does not recognise, or an unterminated literal.
SourceFile = 47
Metadata = 48
/// key = value
ConceptMap = 49
conceptmap "url" { … }
ConceptMapPrefix = 50
prefix s = "url"
ConceptMapUnmapped = 51
unmapped for s = provided
ConceptMapEntry = 52
s:code - t:code
ConceptMapCode = 53
s:code
ConceptMapRelation = 54
The relationship operator between two concept map codes.
MapDeclaration = 55
map "url" = "name"
UsesDeclaration = 56
uses "url" alias Name as source
UsesAlias = 57
alias Name
ImportsDeclaration = 58
imports "url"
ConstantDeclaration = 59
let name = expression;
Group = 60
group Name(…) extends Base <<types>> { … }
ParameterList = 61
(source src : Type, target tgt : Type)
Parameter = 62
source src : Type
TypeAnnotation = 63
: Type
ExtendsClause = 64
extends Base
TypeMode = 65
<<types>> or <<type+>>
RuleBlock = 66
{ rule; rule; }
Rule = 67
SourceList = 68
The sources of a rule, separated by commas.
Source = 69
Cardinality = 70
0..*
DefaultClause = 71
default (expression)
SourceListMode = 72
first, not_first, last, not_last, only_one
Alias = 73
as name
WhereClause = 74
where (expression)
CheckClause = 75
check (expression)
LogClause = 76
log (expression)
TargetList = 77
The targets of a rule, separated by commas.
Target = 78
Transform = 79
= transform on a target.
TargetListMode = 80
first, last, single, share id, collate
Invocation = 81
name(arguments), a transform or a group invocation.
ArgumentList = 82
(argument, argument)
DependentClause = 83
then Group(a, b) { … }
IdentityList = 84
: field, field, in the batch identity rule form.
RuleName = 85
"name" after a rule.
QualifiedName = 86
a.b.c
Literal = 87
A literal value.
Quantity = 88
5 'mg', 3 days
NameRef = 89
name in an expression.
ExternalConstant = 90
%name
ParenExpr = 91
(expression)
MemberExpr = 92
expression.member or expression.function(…)
CallExpr = 93
function(arguments)
IndexExpr = 94
expression[index]
PrefixExpr = 95
-expression
BinaryExpr = 96
left op right
TypeExpr = 97
expression is Type, expression as Type
NullLiteral = 98
{}
Error = 99
Tokens the parser could not place.