Skip to content

Conversation

@istathar
Copy link
Member

@istathar istathar commented Jul 31, 2025

When reporting errors, we now report both a succinct error message and a more detailed explanation of what it means and what good input code would look like. To that end, we enrich the details for each of the current failure modes in ParsingError and change TechniqueError to take both.

Update the display of errors to include line and column number, and a pointer to where in the failed line the problem occurred. We also emit the filename, as is conventional in compiler error messsages, which required plumbing the Path through the call stack.

Finally we have updated the check command to have an --output option which takes native to dump the AST, otherwise either exiting 1 and reporting the error, or exiting 0 indicating a pass.

@istathar istathar self-assigned this Jul 31, 2025
@istathar istathar merged commit 779ad37 into technique-lang:main Jul 31, 2025
1 check passed
@istathar istathar mentioned this pull request Jul 31, 2025
istathar added a commit that referenced this pull request Jul 31, 2025
Having gone to the trouble in #57 to present richer error messages,
we've needed to go through some refinement to actually emit these
appropriate errors in various scenarios. This branch also adds some
preliminary efforts to detect malformed or invalid input in such a way
that we can guess the user's intent and give a better error as a result.
@istathar istathar deleted the improve-error-text branch August 14, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant