add interface support

This commit is contained in:
CaiHQ
2023-06-06 11:01:20 +08:00
parent 972070c6df
commit c24242ab87
7 changed files with 1095 additions and 975 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -95,6 +95,18 @@ public class YJSParserBaseListener implements YJSParserListener {
* <p>The default implementation does nothing.</p>
*/
@Override public void exitClzOrFunctionDeclaration(YJSParser.ClzOrFunctionDeclarationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterInterfaceDeclaration(YJSParser.InterfaceDeclarationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitInterfaceDeclaration(YJSParser.InterfaceDeclarationContext ctx) { }
/**
* {@inheritDoc}
*

View File

@@ -60,6 +60,13 @@ public class YJSParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitClzOrFunctionDeclaration(YJSParser.ClzOrFunctionDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitInterfaceDeclaration(YJSParser.InterfaceDeclarationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*

View File

@@ -77,6 +77,16 @@ public interface YJSParserListener extends ParseTreeListener {
* @param ctx the parse tree
*/
void exitClzOrFunctionDeclaration(YJSParser.ClzOrFunctionDeclarationContext ctx);
/**
* Enter a parse tree produced by {@link YJSParser#interfaceDeclaration}.
* @param ctx the parse tree
*/
void enterInterfaceDeclaration(YJSParser.InterfaceDeclarationContext ctx);
/**
* Exit a parse tree produced by {@link YJSParser#interfaceDeclaration}.
* @param ctx the parse tree
*/
void exitInterfaceDeclaration(YJSParser.InterfaceDeclarationContext ctx);
/**
* Enter a parse tree produced by {@link YJSParser#eventDeclaration}.
* @param ctx the parse tree

View File

@@ -52,6 +52,12 @@ public interface YJSParserVisitor<T> extends ParseTreeVisitor<T> {
* @return the visitor result
*/
T visitClzOrFunctionDeclaration(YJSParser.ClzOrFunctionDeclarationContext ctx);
/**
* Visit a parse tree produced by {@link YJSParser#interfaceDeclaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitInterfaceDeclaration(YJSParser.InterfaceDeclarationContext ctx);
/**
* Visit a parse tree produced by {@link YJSParser#eventDeclaration}.
* @param ctx the parse tree