-
Notifications
You must be signed in to change notification settings - Fork 469
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
TEAL: Add columns to assembly error messages. #5402
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This should let IDE integrations or lsp-like programs use the assembly output to direct the cursor the exact spot of many problems. It also allowed some error improvements and simplifications because tokens from the assembly process now know their line number.
jannotti
changed the title
Add columns to TEAL assembly error messages.
TEAL: Add columns to assembly error messages.
May 19, 2023
Codecov Report
@@ Coverage Diff @@
## master #5402 +/- ##
==========================================
+ Coverage 55.44% 55.46% +0.01%
==========================================
Files 452 452
Lines 63689 63717 +28
==========================================
+ Hits 35312 35340 +28
- Misses 25965 25971 +6
+ Partials 2412 2406 -6
... and 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ahangsu
reviewed
May 23, 2023
ahangsu
reviewed
May 24, 2023
Neat! |
bbroder-algo
approved these changes
May 25, 2023
ahangsu
approved these changes
May 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should let IDE integrations or lsp-like programs use the assembly output to direct the cursor the exact spot of many problems. It also allowed some error improvements and simplifications because tokens from the assembly process now know their line number.
The changes in terms of line count are big, but mostly boring. The signatures of the asm* and type* functions changed to take tokens instead of strings, which caused a lot of churn. Also, in order to minimize the work to change existing tests, I converted
testProg
calls so that they calledexp
instead of constructing anExpect
. That allowed me to make the column checking optional by making the column an optional final argument toexp
. I extended a bunch of tests to check columns, but many of the tests were mechanically (emacs kbd macros!) converted toexp
, checking only the line number that they always checked.