tunnelvisionlabs / antlr4ts

Optimized TypeScript target for ANTLR 4
Other
634 stars 109 forks source link

return type declaration does not support function types #537

Open thautwarm opened 2 years ago

thautwarm commented 2 years ago

The grammar:

op_or returns [((arg0:MExpr_t, arg1:MExpr_t) => MExpr_t) result]
      : '||' { $result = ExprOr; }

Which caused such an error:

error(63): src/xxx.g4: unknown attribute reference 'result' in '$result = ExprOr;'