You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: implement proper source location tracking in diagnostics
- Add source_files field to TypedProgram to carry source information
- Add span tracking to zyntax_embed parsing path (walk_parse_tree/walk_pair_to_value)
- Add set_current_span() method to AstHostFunctions trait with default impl
- Implement set_current_span() in TypedAstBuilder to track current parsing position
- Add parse_to_json_with_filename() method to LanguageGrammar
- Update ZynML::run_file() to use load_module_file() for proper filename tracking
- Populate SourceMap from program.source_files in lowering diagnostics
- Update ConsoleDiagnosticDisplay to show real source code and accurate spans
Diagnostics now show:
- Real filenames instead of "unknown.zy"
- Accurate line and column numbers from source
- Actual source code snippets
- Proper multi-character span underlines
Fixes issue where all errors showed position 1:1 with placeholder text.
0 commit comments