Expand description
Top-level statement dispatcher and block parser.
parse_statement_to_ast is the main entry point called by the top-level
parse loop in Parser::parse. It peeks at the current token and routes
to the appropriate sub-parser. Anything that does not start with a known
keyword is parsed as a bare expression statement.
Modulesยง
- const_
declaration ๐ - Constant declaration parser (
CONST). - for_
statement ๐ forloop parser - three distinct syntaxes.- function_
declaration ๐ - Function declaration parser (
fn). - if_
statement ๐ - Conditional statement parser (
if/else if/else). - import_
statement ๐ - Import statement parser (
get). - match_
statement ๐ - match statement parser.
- record_
declaration ๐ - Record (struct) declaration parser (
record). - tag_
declaration ๐ - Tag (enum) declaration parser (
tag). - variable_
declaration ๐ - Variable declaration parser (
dec). - while_
statement ๐ whileloop parser.