Description
Error messages should show the exact line and column where the error occurred, with a snippet of the source code.
Current Behavior
Error: undefined variable 'foo'
Expected Behavior
Error: undefined variable 'foo'
--> main.carv:5:10
|
5 | let x = foo + 1;
| ^^^
Where to Start
pkg/eval/eval.go - Errors are generated here
pkg/types/checker.go - Type errors
pkg/parser/parser.go - Parse errors
- Token structs already have Line/Column info
Good First Issue
This improves developer experience significantly! Can be done incrementally - start with one error type.
Description
Error messages should show the exact line and column where the error occurred, with a snippet of the source code.
Current Behavior
Expected Behavior
Where to Start
pkg/eval/eval.go- Errors are generated herepkg/types/checker.go- Type errorspkg/parser/parser.go- Parse errorsGood First Issue
This improves developer experience significantly! Can be done incrementally - start with one error type.