Hecr::Compiler::Parser
Builds the template tree from the token stream and applies the structural validations HEEx performs at engine level: tag matching, slot placement, special-attribute rules, component name shapes.
Constants
FUNCTION_NAME = /\A[a-z_][a-zA-Z0-9_]*[?!]?\z/
MAX_NESTING_DEPTH = 1000
Caps element nesting. The tokenizer/parser are iterative, but the formatter, codegen, and the AST walkers in the LSP recurse over the tree — this bound keeps pathological input from overflowing their stacks (and is far deeper than any real template).
MODULE_NAME = /\A[A-Z][a-zA-Z0-9_]*\z/
NO_FORMAT_ATTR = "hecr-no-format"
Constructors
Class methods
Instance methods
parse
Source