Skip to content

V1.9.5 updates#46

Open
hkimura-intersys wants to merge 8 commits into
intersystems:mainfrom
hkimura-intersys:v1.9.5-updates
Open

V1.9.5 updates#46
hkimura-intersys wants to merge 8 commits into
intersystems:mainfrom
hkimura-intersys:v1.9.5-updates

Conversation

@hkimura-intersys

Copy link
Copy Markdown
Member

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.c file. I moved this to scanner.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 in scanner.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.h

Highlighting 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.scm for 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/

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.
@hkimura-intersys hkimura-intersys self-assigned this Jun 30, 2026
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant