Skip to main content

Module syntax

Module syntax 

Source

Enums§

Kind

Constants§

FIELD_RHS
Field id for the “rhs” named child (right-hand side of binary expressions in the expression grammar). Use with sipha::red::SyntaxNode::field_by_id on a NodeBinaryExpr to get the right operand.
KEYWORDS
LeekScript keywords (for completion and tooling). Sorted for display.
SYNTHETIC_ROOT
sipha uses this kind for a wrapper root when the grammar produces a single root node.

Functions§

is_valid_identifier
Returns true if name is a valid LeekScript identifier (non-empty, starts with letter or underscore, rest alphanumeric or underscore). Used e.g. for rename validation in LSP.
kind_name
Human-readable name for a syntax kind (for diagnostics and debugging).