Skip to content

Add UDQ/ACTIONX support: recognition, highlighting, hover, completion, alignment - #52

Merged
magnesj merged 1 commit into
OPM:mainfrom
magnesj:feature/udq-expression-alignment
Jun 29, 2026
Merged

Add UDQ/ACTIONX support: recognition, highlighting, hover, completion, alignment#52
magnesj merged 1 commit into
OPM:mainfrom
magnesj:feature/udq-expression-alignment

Conversation

@magnesj

@magnesj magnesj commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

Brings the UDQ expression sub-language and ACTIONX action blocks into the editor.

Recognition & diagnostics

  • Validate that every statement in a UDQ block begins with a control word
    (ASSIGN/DEFINE/UNITS/UPDATE); flag stray leading tokens. Continuation
    lines of a statement whose / is deferred are not flagged.
  • Track ACTIONX ... ENDACTIO blocks and flag an action block that is never
    closed by a matching ENDACTIO.

Highlighting (tmLanguage)

  • Scope UDQ control words, UDQ functions (name-followed-by-paren), and the
    comparison/logical operators used in expressions.
  • Scope the ACTIONX / ENDACTIO action-block delimiters as control keywords.

Editor (hover & completion)

  • Hover on a UDQ control word or function shows its meaning/signature.
  • Completion inside UDQ/ACTIONX offers control words at statement start and
    UDQ functions (inserted with parentheses) inside expressions.

Column alignment

  • UDQ expression blocks get a dedicated three-column layout — control word,
    variable, and expression — that lines up each statement's terminating / and
    treats a / used for division inside the expression as part of the
    expression rather than the terminator.
  • Interspersed comments and blank lines inside a UDQ table no longer break the
    alignment groups.

Docs

  • README feature, diagnostics, and release-notes entries for the above.

Refs #18

Verified: tsc clean; 314 jest tests pass (9 suites).

…, alignment

Brings the UDQ expression sub-language and ACTIONX blocks into the editor:

- Recognise UDQ/ACTIONX: validate that every UDQ statement begins with a
  control word (ASSIGN/DEFINE/UNITS/UPDATE), and flag an ACTIONX action block
  that is never closed by a matching ENDACTIO.
- Syntax highlighting (tmLanguage) for UDQ control words, UDQ functions
  (name-followed-by-paren), and comparison/logical operators.
- Hover and completion (new udq.ts vocabulary module): hover a UDQ control word
  or function for its meaning/signature; completion offers control words at
  statement start and UDQ functions inside expressions.
- Column alignment for UDQ expression blocks: right-align the expression column
  and control words, parse division-safe, and preserve interspersed comments
  and blank lines inside a UDQ table without breaking the alignment groups.

Refs #18

Squashed from 5 commits cherry-picked from feature/udq-expression-align.
@magnesj
magnesj force-pushed the feature/udq-expression-alignment branch from d7815fb to a24e69b Compare June 29, 2026 12:48
@magnesj
magnesj merged commit 574280c into OPM:main Jun 29, 2026
4 checks passed
@magnesj
magnesj deleted the feature/udq-expression-alignment branch June 29, 2026 12:51
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