fix: use prototype for lexer and method for parser

This commit is contained in:
Camilo Roca 2020-03-20 15:21:57 +01:00
parent 1922a3744e
commit 091976c497
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ case <index>:
* overriding implementation impossible to maintain.
*/
RuleSempredFunction(r, actions) ::= <<
<r.name>_sempred(localctx, predIndex) {
<if (r.factory.g.lexer)><lexer.name>.prototype.<r.name>_sempred = function<else><r.name>_sempred<endif>(localctx, predIndex) {
switch(predIndex) {
<actions:{index| case <index>:
return <actions.(index)>;}; separator="\n">