pboyer / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
Other
26 stars 1 forks source link

Weird syntax in the recRuleSetReturnAction template #32

Closed willfaught closed 2 years ago

willfaught commented 8 years ago

https://github.com/pboyer/antlr4/blob/master/tool/resources/org/antlr/v4/tool/templates/codegen/Go/Go.stg#L1279

What is this doing? It looks like it results in something like $x = $y.$x, which is invalid Go syntax.

willfaught commented 8 years ago

Is this code that's inlined in the grammar productions?