Commit Briefs

5b15eab651 Murilo Ijanc

Add integration tests for v0.1 (main)

Test suite covering all language features: arithmetic, strings, variables, if/else, while, for/range, functions with implicit/explicit return, type mismatch errors, and all CLI subcommands (run, tokenize, parse, compile).


faf55781ee Murilo Ijanc

Add type checking and contextual error messages

Compiler infers types and validates type annotations at compile time (e.g. let x: int = "hello" is an error). Span gains line_col() for mapping byte offsets to line:column. Errors now render with source context showing the exact location and underline.


11a12b204a Murilo Ijanc

Add function calls with call stack

Each function compiles to its own Chunk with name and arity. VM uses CallFrame stack for nested calls. Parameters are first locals in each frame. Supports implicit return (last expression without semicolon) and explicit return statements.


862cec6910 Murilo Ijanc

Add control flow with if/else and while loops

New opcodes for comparison (Equal, NotEqual, Less, LessEqual, Greater, GreaterEqual), logical Not, and jumps (JumpIfFalse, Jump, Loop). Compiler uses jump patching for if/else branches and backward jumps for while loops.


37c978c740 Murilo Ijanc

Add variable support with let/let mut

New opcodes GetLocal and SetLocal for stack-slot based variables. Compiler resolves variable names to slot indices and checks mutability at compile time. Immutable variables (let) cannot be reassigned.


e415d90b66 Murilo Ijanc

Add bytecode compiler and stack-based VM

Compile AST to bytecode with opcodes for constants, arithmetic, print, and return. Stack-based VM with dispatch loop executes bytecode. First programs running end-to-end: source -> lexer -> parser -> compiler -> VM -> output.


a40058a5b5 Murilo Ijanc

Add full parser with statements and functions

Parse complete programs: FnDecl, let/let mut, if/else/else if, while, for..in range(), return, print, assignments. Semicolons terminate statements, last expression without semicolon is implicit return.


ebe3a0a72c Murilo Ijanc

Add expression parser with operator precedence

Recursive-descent parser for expressions with proper precedence: equality > comparison > addition > multiplication > unary > call > primary. Supports literals, binary/unary ops, function calls, and parenthesized grouping.


8b5123e605 Murilo Ijanc

Extend lexer with strings, keywords and identifiers

Add support for string literals with escapes, float literals, identifiers, keywords (let, fn, if, etc), two-char tokens (==, !=, ->, <=, >=), comments (#), and line/column tracking for error messages.


6004e88422 Murilo Ijanc

Add basic lexer with tokenize command

Lexer tokenizes numbers, arithmetic operators, parentheses and semicolons. CLI tokenize subcommand reads .ol files and prints token stream.


2f626af470 Murilo Ijanc

Add span and error types

Span tracks byte positions in source code for error reporting. OlangError carries a message and span.


c916ec471c Murilo Ijanc

Init project scaffolding

Setup Cargo.toml, Makefile, LICENSE, README and initial main.rs for the olang programming language.