Summary
The editor's Lezer grammar rejects quoted (string) method names like A."some method"(),
which the renderer accepts. ZenUML uses quoted method names for spaced/multi-word method labels,
and this is one of the two false-positive cases explicitly blocking in-editor error feedback
(see web/src/editor/modes.ts — the Lezer linter is disabled partly because of "the shipped
quoted-method-name templates").
Steps to reproduce
Type A."some method"() (or A."do it"() { B.c() }).
Expected vs Actual
| Input |
Lezer (editor) |
ANTLR (renderer) |
A.method() |
ok |
ok |
A."some method"() |
ERROR (2 nodes) |
ok |
A."m"() |
ERROR |
ok |
A.方法() |
ok (Unicode, fixed by #809) |
ok |
Location
web/src/editor/grammar/zenuml.grammar ~line 361:
MethodName { !call Identifier }
Accepts only an Identifier; a String method name fails.
Fix sketch
MethodName { !call (Identifier | String) }
(String token already exists. Same pattern as #808's Label fix.) Regenerate the parser; verify
A."some method"() parses with 0 error nodes, conformance subset holds, and A.method() /
A.方法() still parse.
Why it matters
This is the LAST of the two named false-positive blockers in modes.ts (the other,
declare-then-message, already parses cleanly). Closing it clears the way to wiring the
already-built zenumlLinter and giving users real in-editor error feedback.
Found via the editor-improvement campaign (grammar-gap hunt toward enabling error feedback).
Summary
The editor's Lezer grammar rejects quoted (string) method names like
A."some method"(),which the renderer accepts. ZenUML uses quoted method names for spaced/multi-word method labels,
and this is one of the two false-positive cases explicitly blocking in-editor error feedback
(see
web/src/editor/modes.ts— the Lezer linter is disabled partly because of "the shippedquoted-method-name templates").
Steps to reproduce
Type
A."some method"()(orA."do it"() { B.c() }).Expected vs Actual
A.method()A."some method"()A."m"()A.方法()Location
web/src/editor/grammar/zenuml.grammar~line 361:Accepts only an
Identifier; aStringmethod name fails.Fix sketch
(
Stringtoken already exists. Same pattern as #808's Label fix.) Regenerate the parser; verifyA."some method"()parses with 0 error nodes, conformance subset holds, andA.method()/A.方法()still parse.Why it matters
This is the LAST of the two named false-positive blockers in modes.ts (the other,
declare-then-message, already parses cleanly). Closing it clears the way to wiring the
already-built
zenumlLinterand giving users real in-editor error feedback.Found via the editor-improvement campaign (grammar-gap hunt toward enabling error feedback).