Changes so variables starting with tru / fal will no longer fail#50
Merged
Phergus merged 3 commits intoRPTools:developfrom Aug 16, 2020
Merged
Changes so variables starting with tru / fal will no longer fail#50Phergus merged 3 commits intoRPTools:developfrom
Phergus merged 3 commits intoRPTools:developfrom
Conversation
Merudo
reviewed
Aug 15, 2020
Member
Merudo
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r1.
Reviewable status:complete! all files reviewed, all discussions resolved
Member
Author
|
Updated so that true/false are no longer tokens and will instead be identifiers. Added code to MapVariableResolver to treat these as constant (as its the closest thing that this parser has to a symbol table). Similar code will need to be added to MapToolVariableResolver (and has been done as part of RPTools/maptool#2168) |
Phergus
approved these changes
Aug 16, 2020
Contributor
Phergus
left a comment
There was a problem hiding this comment.
Reviewed 6 of 6 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved
Phergus
added a commit
to Phergus/maptool
that referenced
this pull request
Aug 16, 2020
Bump parser version to 1.8.3 to pick up changes for true/false. RPTools/parser#50
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.
Its not a 100% fix, for example
falseSenseOfSecurity = 1
will still fail... but it's still an improvement over things like falling = 1 failing...
partially fixes RPTools/maptool#1736
A proper fix would require not tokenising "true"/"false" and having them as parser rules which can make decisions based on context rather than lexer which can not. But this is too big a change at this point in time.
This change is