Lexer and parser
Tokenization and recursive-descent parsing are implemented in Neo.
The repository now contains a complete Neo interpreter implemented in Neo. It includes its own lexer, parser, evaluator, runtime environment, file runner, and persistent multiline REPL.
The interpreter executes Neo's full regression suite through interpreted execution. The native compiler and the Neo interpreter can now be checked against the same language behavior.
Neo REPL. Type :quit to exit. > {var x 40} 40 > {+ x 2} 42 > {def square (value) ... {* value value}} > {square 6} 36
The compiler remains the fast path for native executables. The interpreter makes Neo's semantics executable in Neo source.
Tokenization and recursive-descent parsing are implemented in Neo.
AST evaluation, functions, closures, references, dictionaries, and bound methods.
Vectorized arithmetic, comparison, logic, spread, matrices, statistics, and AI primitives.
Three-way if, loops, frames, break, next, repeat, and higher-order functions.
Heterogeneous data, executable code values, and the run bridge.
Run a file, keep its environment, and continue interactively.
src/interpreter.neo contains the implementation. Generated C++ is a build artifact and should not be edited by hand.