Skip to content

fix: bug fixes for UDL keywords - #62

Merged
hkimura-intersys merged 3 commits into
intersystems:mainfrom
hkimura-intersys:v1.10.2-updates
Oct 9, 2026
Merged

hkimura-intersys merged 3 commits into
intersystems:mainfrom
hkimura-intersys:v1.10.2-updates

Conversation

@hkimura-intersys

Copy link
Copy Markdown
Member

This PR includes a bump to version 1.10.2, which has bug fixes for a few class keywords and scanner changes.

Grammar

  • GeneratedBy: split out of _class_single_class_keyword into its own rule.
    It accepts a class name as before, or a new generated_by_path token for
    source file paths (/path/AutoPage.csr, C:\path\AutoPage.csr). The path
    must contain a / or \, so it doesn't compete with class names.
  • sql_field_reference: accepts a numeric field, e.g. {1} (expr/grammar.js).
  • Language = cpp: accepted as an external method/trigger language.
  • CallMethod: the body may be a method call (_method_call) as well as a
    routine_tag_call (udl/grammar.js).
  • #define macro values (core/grammar.js):
    • The value may follow the args directly: #define F(%a)(%a+1).
    • Lines after a ##continue line may start in column 0, so labels and #;
      comments work in multi-line macros. The tree shape is unchanged
      (macro_value, macro_value_line_with_continue, macro_value_line).

Scanner (common/scanner.h)

  • Set {*} / Set {Name}: one space followed by { now starts a command
    argument, unless an argumentless loop is valid there. Before this,
    sql_field_reference couldn't be the first Set target.
  • ##continue lines: may start in column 0 when continuing a macro. The
    scanner tells this apart from the first value line because
    _STATEMENT_TERMINATION isn't valid on a continued line.
  • <SCRIPT> in embedded HTML: the <script and </script> checks in
    lex_fenced_text ignore case. Before this, </SCRIPT> was never matched and
    the rest of the class was swallowed as script text.

Tests

  • class-keywords.txt (udl, objectscript): GeneratedBy with a class name, a
    Unix path and a Windows path.
  • pound-define.txt (core, objectscript, objectscript_routine): value right
    after args, a label as the last continued line, a label on a middle line, and
    a column-0 #; comment line.
  • properties.txt (udl, objectscript): expected trees updated for the new
    SqlComputeCode shape.
  • tested on all healthshare lib code and SYS classes, as well as SQL routines and .int SYS files.

@hkimura-intersys
hkimura-intersys merged commit a1a5d7a into intersystems:main Oct 9, 2026
11 checks passed
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