Commit Graph

1 Commits

Author SHA1 Message Date
Bob Nystrom
b69dfe3bd6 feat: add compile error detection and line tracking to test runner and compiler
Add support for testing compile errors by introducing `// expect error` annotations in test files. The test runner now validates that expected errors occur on specific lines and that the compiler exits with code 1 when errors are present. The compiler's error output is enhanced to include line numbers in the format `[Line N] Error`, and the `Token` struct gains a `line` field to track token positions. The main entry point returns exit code 1 when compilation fails, enabling the test runner to verify error exit codes.
2013-10-28 14:12:39 +00:00