W302 Builder on a transparent alternative that never makes a nodeΒΆ
A builder after => makes the value of a node. This alternative of a transparent rule ?name always leaves exactly one visible child, so it always gives way to that child and never makes a node. Its builder is never used.
start: paren
?paren: "(" NUMBER ")" => list
NUMBER: [0-9]+
grammar.fpeg:2:9: warning[W302]: the builder of this alternative is never used, since it always gives way to its one child and makes no paren node
Remove the builder, or give the alternative an alias, which makes a node whatever the alternative leaves.
start: paren
?paren: "(" NUMBER ")" -> group => list
NUMBER: [0-9]+