Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use optional method syntax for enter/exit/visit #531

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"main": "index.js",
"scripts": {
"prepare": "npm run buildtool && npm link antlr4ts-cli && npm run antlr4ts && npm run tsc && npm link target/src && npm run buildrts",
"prepare": "npm run buildtool && npm link antlr4ts-cli && npm run antlr4ts && npm run tsc && npm link ./target/src && npm run buildrts",
"unlink": "npm unlink antlr4ts && npm unlink target/src && npm unlink antlr4ts-cli && npm run unlinkruntime && npm run unlinktool",
"unlinkruntime": "cd target/src && npm unlink",
"buildtool": "cd tool && npm link -force",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export interface <file.grammarName>Listener extends ParseTreeListener {
<endif>
* @param ctx the parse tree
*/
enter<lname; format="cap">?: (ctx: <lname; format="cap">Context) => void;
enter<lname; format="cap">?(ctx: <lname; format="cap">Context): void;
/**
<if(file.listenerLabelRuleNames.(lname))>
* Exit a parse tree produced by the `<lname>`
Expand All @@ -92,7 +92,7 @@ enter<lname; format="cap">?: (ctx: <lname; format="cap">Context) => void;
<endif>
* @param ctx the parse tree
*/
exit<lname; format="cap">?: (ctx: <lname; format="cap">Context) => void;}; separator="\n">
exit<lname; format="cap">?(ctx: <lname; format="cap">Context): void;}; separator="\n">
}

<namedActions.afterListener>
Expand Down Expand Up @@ -128,7 +128,7 @@ export interface <file.grammarName>Visitor\<Result> extends ParseTreeVisitor\<Re
* @param ctx the parse tree
* @return the visitor result
*/
visit<lname; format="cap">?: (ctx: <lname; format="cap">Context) => Result;}; separator="\n">
visit<lname; format="cap">?(ctx: <lname; format="cap">Context): Result;}; separator="\n">
}

<namedActions.afterVisitor>
Expand Down