V1.9.5 updates#46
Open
hkimura-intersys wants to merge 8 commits into
Open
Conversation
Adjusted the scanner to not immediately process IRIS as a tag, since that is the start of the compiled header for Windows generated routines. Updated highlighting to differentiate between oref method values and properties, etc.
Adjusted quote_permitting_identifier to always have identifier child, and then made it hidden. This makes it significantly easier to parse and discover what node it was aliased to be.
We can ref a class by wrapping the name in strings or by just calling the name directly. By always aliasing the inner contents as identifier, this keeps both implementaitons consistent.
…dentifier, while enforcing token.immediate
I removed unnecessary layers in the grammar so it is significantly easier to parse through the tree to find the node you want. This will also make it more resistant to future changes, requiring fewer updates with each change.
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 includes bug fixes, which are detailed below, as well as highlighting updates.
Scanner Fix for Compiled Headers
Originally, compiled headers (the generated headers in generated routines) were processed in the
objectscript_routine scanner.cfile. I moved this toscanner.h, because there is a case where it could be a compiled header or a tag, and the logic to evaluate it as a tag is already inscanner.h. The case is when the compiled header starts with IRIS. This is technically a valid tag, and has been seen before in some generated files as one. To know if it is a tag or a compiled header, you have to scan all the way to the second line to see if it is %RO. This is now what is done in scanner.hHighlighting Changes
I stopped highlighting
immediate_segment_*nodes directly, so that their parent nodes (which are often aliased to other names for highlighting reasons) are the ones that determine the highlighting pattern.Additionally I added one more pattern to
injections.scmfor queries, as sql queries weren't currently being highlighted in this scenario. Now queries with params also get highlighted correctly.Testing
This was tested on all generated INT files in SYS and all .rtn and .mac files from //projects/sql/databases/sys/rtn/routine/ and //projects/sql/databases/sys/rtn/sql/