From 663b99a971f8dd7f7776fe3647f24ce728b3d434 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 4 Jun 2024 10:44:23 +0200 Subject: Add Visitor (#2) --- src/Python3ParserBaseVisitor.java | 365 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 365 insertions(+) create mode 100644 src/Python3ParserBaseVisitor.java (limited to 'src/Python3ParserBaseVisitor.java') diff --git a/src/Python3ParserBaseVisitor.java b/src/Python3ParserBaseVisitor.java new file mode 100644 index 0000000..1b1832e --- /dev/null +++ b/src/Python3ParserBaseVisitor.java @@ -0,0 +1,365 @@ + +// Generated from src/Python3Parser.g4 by ANTLR 4.13.1 +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link Python3ParserVisitor}, + * which can be extended to create a visitor which only needs to handle a subset + * of the available methods. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +@SuppressWarnings("CheckReturnValue") +public class Python3ParserBaseVisitor extends AbstractParseTreeVisitor implements Python3ParserVisitor { + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitRoot(Python3Parser.RootContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitSimple_stmts(Python3Parser.Simple_stmtsContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitCompound_stmt(Python3Parser.Compound_stmtContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitSimple_stmt(Python3Parser.Simple_stmtContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitAssignment(Python3Parser.AssignmentContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitReturn_stmt(Python3Parser.Return_stmtContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitImport_stm(Python3Parser.Import_stmContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitDotted_name(Python3Parser.Dotted_nameContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitFuncdef(Python3Parser.FuncdefContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitParamlist(Python3Parser.ParamlistContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitParamdef(Python3Parser.ParamdefContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitAugassign(Python3Parser.AugassignContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitIf_stmt(Python3Parser.If_stmtContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitWhile_stmt(Python3Parser.While_stmtContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitFor_stmt(Python3Parser.For_stmtContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitBlock(Python3Parser.BlockContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitComp_op(Python3Parser.Comp_opContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitExpr(Python3Parser.ExprContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitAtom(Python3Parser.AtomContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitTestlist_comp(Python3Parser.Testlist_compContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitTrailer(Python3Parser.TrailerContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitExprlist(Python3Parser.ExprlistContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitArglist(Python3Parser.ArglistContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitArgument(Python3Parser.ArgumentContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitComp_iter(Python3Parser.Comp_iterContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitComp_for(Python3Parser.Comp_forContext ctx) { + return visitChildren(ctx); + } + + /** + * {@inheritDoc} + * + *

+ * The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}. + *

+ */ + @Override + public T visitComp_if(Python3Parser.Comp_ifContext ctx) { + return visitChildren(ctx); + } +} -- cgit v1.2.3-18-g5258