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

Make error messages consistently formatted with locations #41

Merged
merged 38 commits into from
Aug 1, 2019

Conversation

JoeyEremondi
Copy link
Contributor

@JoeyEremondi JoeyEremondi commented Sep 5, 2018

Fixed version of #37.

There are two main effects of this change. First, all error messages are printed using the same formatting, for consistency and ease of parsing. Secondly, location information is included in error messages whenever possible.

Now, error messages have the following format:

File filename on loc:
Error: error message text

For example:

File ../tests/test10st.ott on line 55, column 7 - 81:
Warning: Free variables in hom element [[G2]]

While there are a lot of changes, very little of the functionality of Ott is changed, since the changes only affect printing of errors. I've run the tests, and on my machine this causes no regressions.

Note that this PR also includes the changes from #40. This change is now independent of #40.

@PeterSewell
Copy link
Contributor

PeterSewell commented Sep 5, 2018 via email

@JoeyEremondi
Copy link
Contributor Author

@PeterSewell fair enough, would you like me to resubmit without the changes from #40 ?

@PeterSewell
Copy link
Contributor

PeterSewell commented Sep 6, 2018 via email

@JoeyEremondi
Copy link
Contributor Author

@PeterSewell Okay, I've updated this PR to be independent of #40.

@PeterSewell PeterSewell merged commit 7f2fe9c into ott-lang:master Aug 1, 2019
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