Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve reporting, mostly around type information but also source spans #292

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

dorchard
Copy link
Member

@dorchard dorchard commented Sep 25, 2024

This PR does two things:

  1. Improves the reporting of type information, e.g.
    previously we'd get things like:
_area_of_circle_1                - Function
area_of_circle_area_2           Real 4 Variable
area_of_circle_pi_4             Real 4 Parameter
area_of_circle_r_3              Real 4 Variable
main_area_6             Real 4 Variable
main_r_5                Real 4 Variable

now we get:

4:12     r              Real 4 Variable
4:15     area           Real 4 Variable
11:4     area_of_circle          - Function
12:27    pi             Real 4 Parameter
13:28    r              Real 4 Variable
14:16    area           Real 4 Variable
  1. This PR deals with the long standing issues that source span column numbers are always 1 bigger than they should be! This is now fixed in the Show instance (as fixing it deeper down causes issues with the way the lexer automata works).

@dorchard dorchard requested review from raehik and madgen September 25, 2024 21:09
@dorchard dorchard requested a review from raehik September 30, 2024 15:59
@dorchard dorchard merged commit c60caa9 into main Sep 30, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants