Skip to content

attr="value" on a rule element tests the attribute (#438) (4.2.29) - #785

Merged
ddehilster merged 1 commit into
masterfrom
feature/element-eq-438
Oct 15, 2026
Merged

ddehilster merged 1 commit into
masterfrom
feature/element-eq-438

Conversation

@ddehilster

Copy link
Copy Markdown
Member

Follow-up to #782 (#438), the "=" form chosen in review.

  • A key on a rule element that is not a modifier, with one value, is an attribute test: _xALPHA [pos="noun"] is vareq=("pos" "noun"). A value of digits only compares as a number (count=3).
  • A key one edit from a modifier (mtch=(two)) warns in make_ana.log: Element key=mtch is not a modifier; testing it as an attribute. Did you mean match? A bare unknown key ([foo]) is still an error.
  • Fix: element-form vareq=/varne=/vargt=/varlt= passed their value as text, so vargt=("count" 2) never matched. Digit values now become numbers, as they do from a @pre region.

Tests:

  • New fixture tests/element-eq. Each case is written both ways, attr=value and vareq=, and the two give the same output. It also covers a number value, sitting beside match=/one, vargt=, and the typo warning. CI steps are on Windows and Linux.
  • Local full check: 44/45 CI steps (the compiled-bridge step needs $GITHUB_WORKSPACE), Full English Test the same, and 20 analyzers × 21 inputs with 0 differences vs 4.2.18.
  • The fixture compiled to a DLL (-COMPILEANA/-COMPILED) gives the same output as the interpreter.

Docs: VisualText/visualtext-files PR to follow.

Batched: don't tag yet.

🤖 Generated with Claude Code

A key on a rule element that is not a modifier and has one value is now
an attribute test: _xALPHA [pos="noun"] is vareq=("pos" "noun"). A value
of digits only compares as a number. A key one edit from a modifier
(mtch=) warns "Did you mean match?"; a bare unknown key is still an error.

Also fixes element-form vareq=/varne=/vargt=/varlt= (4.2.26): their value
reached the action as text, so vargt=("count" 2) never matched. Digit
values now become numbers, as from a @pre region.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ddehilster
ddehilster merged commit 345ed0b into master Oct 15, 2026
7 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