Skip to content

Editor grammar rejects bare return (no value) the renderer accepts #812

@MrCoder

Description

@MrCoder

Summary

The editor grammar rejects a bare return (a return arrow with no value/label), which the
renderer accepts. Found in the grammar-gap hunt.

Repro

Type return (or return inside a method block). Lezer emits an error node; ANTLR parses cleanly.

Location

web/src/editor/grammar/zenuml.grammarReturn rule required ReturnKeyword Expression.

Fix

Add a ReturnKeyword !statement alternative (bare return). Verified: return, A.b() { return }
parse with 0 error nodes; return x / @Return B->A: done unchanged; conformance subset holds.

Known minor gap (not fixed): A:B — the renderer yields participant {A}; obscure instance

syntax, deferred.

Found via the editor-improvement campaign (grammar-gap hunt).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions