forked from jasder/antlr
fix: no prototype use inside class definition
fix: no need to return this in constructor
This commit is contained in:
parent
57b65a1c92
commit
42b9d8630c
|
@ -147,7 +147,6 @@ class <parser.name> extends <superClass; null="antlr4.Parser"> {
|
||||||
this.literalNames = literalNames;
|
this.literalNames = literalNames;
|
||||||
this.symbolicNames = symbolicNames;
|
this.symbolicNames = symbolicNames;
|
||||||
<namedActions.members>
|
<namedActions.members>
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get atn() {
|
get atn() {
|
||||||
|
@ -232,7 +231,7 @@ case <index>:
|
||||||
* overriding implementation impossible to maintain.
|
* overriding implementation impossible to maintain.
|
||||||
*/
|
*/
|
||||||
RuleSempredFunction(r, actions) ::= <<
|
RuleSempredFunction(r, actions) ::= <<
|
||||||
<if (r.factory.g.lexer)><lexer.name><else><parser.name><endif>.prototype.<r.name>_sempred = function(localctx, predIndex) {
|
<r.name>_sempred(localctx, predIndex) {
|
||||||
switch(predIndex) {
|
switch(predIndex) {
|
||||||
<actions:{index| case <index>:
|
<actions:{index| case <index>:
|
||||||
return <actions.(index)>;}; separator="\n">
|
return <actions.(index)>;}; separator="\n">
|
||||||
|
|
Loading…
Reference in New Issue