Fix kwarg escape#305
Merged
Merged
Conversation
Owner
Author
|
Looks like I need a test for the REPL fragment continuation. I might've created a couple of unreachable lines as well. Maybe I can rewrite those. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #305 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 833 840 +7
Branches 110 113 +3
=========================================
+ Hits 833 840 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Now it munges and processes escapes like a symbol first, which is more like a normal tag. Previously, the tag made a Kwarg object with the verbatim token, sans trailing `=`, with the munging and escape processing only applied if used as a keyword argument for a tag. However, the Kwarg() type has uses in metaprograms, e.g., `my#`, with a similar use demonstrated in the macro tutorial. The difference in handling a real tag argument and a kwarg token inside the scope when it needs munging or escape processing is unintended and therefore a bug. The correct fix is to process earlier in the reader, rather than require a extra steps to munge and process escapes for all future tags using this feature. Stararg tokens were already tokenized separately, and don't munge.
For some fragments, the REPL previously incorrectly asked for more lines with no clear way to end the input. Some fragments triggering the issue, like |if 1:|, should be errors, while others should not, like |if 1:1|. The REPL now attempts to add an extra newline to the compilation if Lissp didn't think it needed more lines of input, but the underlying Python interpreter thinks the compiled input isn't done. If that still doesn't work, the REPL will compile the Python directly to generate an exception, which will hopefully have a useful error message.
Mention using refresh to compile
The contents were easily missed before.
Remove redundant transpile() in tests Fix broken cross-reference in macros.lissp docstring Switch to forward slashes in path in comment in setup.py Update copyright string in conf.py
This file contains hidden or 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
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.
Closes #277.
Closes #273.