pub enum SyntaxKind {
Show 113 variants
WHITESPACE = 0,
COMMENT,
NEWLINE,
INDENT,
DEDENT,
IDENT,
VAR,
ANNOTATION,
STRING,
NUMBER,
L_PAREN,
R_PAREN,
L_BRACK,
R_BRACK,
L_BRACE,
R_BRACE,
COMMA,
COLON,
DOT,
QUESTION,
PIPE,
BANG,
EQ,
PLUS,
MINUS,
STAR,
SLASH,
LT,
GT,
ARROW,
PLUS_EQ,
EQ_EQ,
NEQ,
LT_EQ,
GT_EQ,
AMP_AMP,
PIPE_PIPE,
ERROR,
EOF,
ROOT,
FLOW_DECL,
FLOW_HEADER,
OP_DECL,
OP_HEADER,
OP_META,
PARAM_LIST,
PARAM,
DECL,
DECL_HEADER,
DECL_ATTR,
BLOCK,
BIND_STMT,
CALL_STMT,
WHEN_STMT,
ELSE_CLAUSE,
UNLESS_STMT,
EACH_STMT,
REPEAT_STMT,
UNTIL_CLAUSE,
MATCH_STMT,
CASE_ARM,
DEFAULT_ARM,
ROUTE_STMT,
FALLBACK_STMT,
BRANCH_ARM,
PARALLEL_STMT,
LOOP_STMT,
TIMEOUT_STMT,
BUDGET_STMT,
WITH_TOOLS_STMT,
RETRY_STMT,
SEQ_STMT,
CTX_STMT,
CTX_APPEND_STMT,
RETURN_STMT,
ASSERT_STMT,
EFFECT_ANNOT,
JSON_ESCAPE,
MEMO_STMT,
ONCE_STMT,
CHECKPOINT_STMT,
AWAIT_STMT,
CONFIRM_STMT,
THROTTLE_STMT,
DEBOUNCE_STMT,
VERIFY_STMT,
TRY_STMT,
CATCH_CLAUSE,
RACE_STMT,
SCOPE_STMT,
FINALLY_CLAUSE,
SAGA_STMT,
STEP_ARM,
UNDO_CLAUSE,
PIPE_STMT,
CALL_EXPR,
VAR_EXPR,
FIELD_EXPR,
LIT_EXPR,
FMT_EXPR,
PARSE_EXPR,
PEEK_EXPR,
THING_EXPR,
JSON_EXPR,
OBJ_EXPR,
OBJ_FIELD,
LIST_EXPR,
BIN_EXPR,
UNARY_EXPR,
PAREN_EXPR,
ARG_LIST,
NAME,
CTX_ENTRY,
// some variants omitted
}Expand description
Every token and node kind in the Flux-Lang CST.
#[repr(u16)] with contiguous discriminants (no gaps) so FluxLang can round-trip a kind
through rowan’s u16 by a checked transmute. Keep SyntaxKind::__LAST the final variant.
Variants§
WHITESPACE = 0
A run of spaces/tabs within or leading a line.
COMMENT
A # … line comment (up to, but not including, the line break).
NEWLINE
A line break (\n or \r\n).
INDENT
Emitted before the first token of a line indented deeper than the enclosing block.
DEDENT
Emitted before the first token of a line dedented out of a block (one per level closed).
IDENT
An identifier run [A-Za-z_][A-Za-z0-9_]* — also every (contextual) keyword; the parser
classifies keywords, the lexer does not.
VAR
A $symbol reference.
ANNOTATION
An @annotation (e.g. @effect, @json).
STRING
A "…" or """…""" string literal (one token, delimiters included).
NUMBER
A numeric literal [0-9][0-9_]*(\.[0-9]+)?.
L_PAREN
R_PAREN
L_BRACK
R_BRACK
L_BRACE
R_BRACE
COMMA
COLON
DOT
QUESTION
PIPE
BANG
EQ
PLUS
MINUS
STAR
SLASH
LT
GT
ARROW
PLUS_EQ
EQ_EQ
NEQ
LT_EQ
GT_EQ
AMP_AMP
PIPE_PIPE
ERROR
One or more bytes the lexer could not classify (kept, so the tree stays lossless).
EOF
End of input (never materialized into the tree; a parser convenience).
ROOT
The document root: a whole .flux module.
FLOW_DECL
A single top-level flow declaration (the common case) or the module wrapper.
FLOW_HEADER
The flow [name]([params]) [-> type] header line.
OP_DECL
A top-level composite operation declaration.
OP_HEADER
The op name(params) [-> type] header line.
OP_META
One leading composite-op metadata line (description, risk, effects, …).
PARAM_LIST
The parenthesized parameter list of a flow header.
PARAM
One name: Type parameter.
DECL
A pure-data top-level declaration the L6 host interprets (agent/channel/datasource/
trigger/journey).
DECL_HEADER
The first line of a pure-data declaration.
DECL_ATTR
One key value line inside a pure-data declaration.
BLOCK
An indented block of statements (a flow/clause body).
BIND_STMT
CALL_STMT
WHEN_STMT
ELSE_CLAUSE
UNLESS_STMT
EACH_STMT
REPEAT_STMT
UNTIL_CLAUSE
MATCH_STMT
CASE_ARM
DEFAULT_ARM
ROUTE_STMT
FALLBACK_STMT
BRANCH_ARM
PARALLEL_STMT
LOOP_STMT
TIMEOUT_STMT
BUDGET_STMT
WITH_TOOLS_STMT
RETRY_STMT
SEQ_STMT
CTX_STMT
CTX_APPEND_STMT
RETURN_STMT
ASSERT_STMT
EFFECT_ANNOT
JSON_ESCAPE
MEMO_STMT
ONCE_STMT
CHECKPOINT_STMT
AWAIT_STMT
CONFIRM_STMT
THROTTLE_STMT
DEBOUNCE_STMT
VERIFY_STMT
TRY_STMT
CATCH_CLAUSE
RACE_STMT
SCOPE_STMT
FINALLY_CLAUSE
SAGA_STMT
STEP_ARM
UNDO_CLAUSE
PIPE_STMT
CALL_EXPR
VAR_EXPR
FIELD_EXPR
LIT_EXPR
FMT_EXPR
PARSE_EXPR
PEEK_EXPR
THING_EXPR
JSON_EXPR
OBJ_EXPR
OBJ_FIELD
LIST_EXPR
BIN_EXPR
UNARY_EXPR
PAREN_EXPR
ARG_LIST
NAME
CTX_ENTRY
One purpose/include/exclude/budget sub-line inside a ctx block. Its ownership is
structural; semantic lowering decodes the scalar header fields from its leaf tokens.
Implementations§
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 more