- ast.rs: Param, FieldDef, FuncDef, StructDef, TopLevelDef,
TopLevelDefKind, Program
- parser.rs: parse_program, parse_top_level_def, parse_func_def,
parse_struct_def with param/field list helpers;
synchronize_top_level for recovery; 14 new tests (76 total)
- main.rs: parse source file as a Program and print the AST
- ast.rs: add Type, Block, ElseBranch, Stmt, StmtKind
- parser.rs: parse_type, parse_block, parse_stmt and all sub-parsers;
missing-token insertion via expect(), synchronize() for panic-mode
recovery on non-startable tokens; 26 new tests (62 total)
- main.rs: REPL now parses statements instead of bare expressions
Introduces the fluxc Rust crate with the first two compiler stages:
- token.rs: define_tokens! macro generates TokenKind enum and its
Display impl from a single table covering all Flux tokens
(literals, keywords, operators, punctuation, Eof/Unknown).
Span (half-open u32 byte range) and Token<'src> (kind + span +
zero-copy text slice) round out the module.
- lexer.rs: Lexer<'src> produces Token<'src> from a source &str.
Skips whitespace, // line comments, and /* */ block comments.
Handles all integer bases (decimal, hex, octal, binary with _
separators), floats (fractional + exponent), string/char literals
with escape sequences, and Unicode identifiers via unicode-xid.
Implements Iterator<Item = Token> and includes 17 unit tests.
Also adds .gitignore (ignores fluxc/target) and expands
examples/fibonacci.flx with an iterative variant.
Adds the vscode-flux extension with TextMate grammar covering keywords,
types, literals, operators, comments, and function/struct name highlighting.
Supports .flux and .flx file extensions.
Add the LL(1) context-free grammar (GRAMMAR.ebnf), token and syntax
reference (SYNTAX.md), LL(1) verification tool (ll1_check.py), and a
fibonacci example demonstrating the language.