Files
rlox/test_error.lox
T
Giulio Agostini 41253e932a Add source location tracking to AST nodes
The commit expands the source location tracking through the AST by:

1. Switching from raw Expr/Stmt nodes to AstNode wrappers containing
source slices 2. Updating interpreter and parser to preserve location
info through node traversal 3. Enhancing error reporting with richer
source context information
2025-10-04 19:02:33 +02:00

10 lines
260 B
Lox

// Test script to verify error positioning
var a = 5;
var b = "hello";
print 0;
var result = a + b; // This should cause a type error
print 1;
43 + "hello"; // This should cause a type error
print result;
print 46 + "world"; // This should cause a type error