fix(core, expr grammars): fix reported bugs#44
Draft
hkimura-intersys wants to merge 3 commits into
Draft
Conversation
In expr grammar, fixed gvn to allow namespace to be arbitary expression(s). Additionally, allowed s in instance variable, as that stands for shadow modified bit for the property.
Also, removed the requirement for .. in relative functions to be immediate, as the only
actual requirement is that the name comes immediately after the dots. This makes it
so things like Return $CASE(x,
..#MyParameter:"Hello",
5:"Goodbye"
)
are correctly parsed now.
In core grammar, allowed relative dot functions to be locktypes, so valid statements like
Lock +x#..MyFunction() worked as expected.
Updated highlighting in udl such that method keyword is grouped with other class fields and class keyword is unique.
the scanner was incorrectly eating the . as bol_extra if it was
the first thing in a newline of a multiline expression. So, Return $CASE(x,
..#MyParameter:"Hello",
5:"Goodbye"
)
was failing. This is now fixed
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.
Overview
This PR fixes 4 bugs that were found by Keith @isc-kcressma
Fixes Explained
Instance variable s%
s stands for stands for shadow modified bit for the property, and is valid, so this is now allowed in instance variables.
gvn namespace
fixed gvn to allow namespace to be arbitary expression(s). This makes it so valid namespaces such as
Set x = ^|"^^" _ $zu(12)|globalnameare parsed correctly.Relative dot expressions
Removed the requirement for .. in relative functions to be immediate, as the only actual requirement is that the name comes immediately after the dots. This makes it so things like
are correctly parsed now.
Locktypes
In core grammar, allowed relative dot expressions to be locktypes, so valid statements like Lock +x#..MyFunction() worked as expected.
Scanner Fix
Even once the relative dot expressions was fixed, something like

failed to parse from the objectscript_routine parser. The issue was since the newline of the multiline expression started with .., the scanner registered it as bol_extra incorrectly. This is now fixed such that if it isn't looking for a specific token, the scanner won't eat those dots incorrectly. This test was added to the core and objectscript_routine test corpus.
Highlighting Changes
Updated highlighting in udl such that method keyword is grouped with other class fields and class keyword is unique.
Testing
First, all test cases pass here. (see workflow).
Additionally, I tested this on all .rtn and .mac files from
//projects/sql/databases/sys/rtn/routine/and//projects/sql/databases/sys/rtn/sql/. This tests are not included in this repo, as they are not open source. But, this was done as part of my local testing.I also added test cases for each of these scenarios, all now passing.