1 // Generated from doc/examples/simple_expression/Expr.g4 by ANTLR 4.9.2
2 module ExprVisitor;
3 
4 import antlr.v4.runtime.tree.ParseTreeVisitor;
5 import ExprParser : ExprParser;
6 import std.variant : Variant;
7 
8 /**
9  * This interface defines a complete generic visitor for a parse tree produced
10  * by {@link ExprParser}.
11  *
12  * @param Variant The return type of the visit operation. Use {@link void} for
13  * operations with no return type.
14  */
15 public interface ExprVisitor : ParseTreeVisitor {
16     /**
17      * Visit a parse tree produced by {@link ExprParser#prog}.
18      * @param ctx the parse tree
19      * @return the visitor result
20      */
21     public Variant visitProg(ExprParser.ProgContext ctx);
22     /**
23      * Visit a parse tree produced by the {@code Div}
24      * labeled alternative in {@link ExprParser#expr}.
25      * @param ctx the parse tree
26      * @return the visitor result
27      */
28     public Variant visitDiv(ExprParser.DivContext ctx);
29     /**
30      * Visit a parse tree produced by the {@code Add}
31      * labeled alternative in {@link ExprParser#expr}.
32      * @param ctx the parse tree
33      * @return the visitor result
34      */
35     public Variant visitAdd(ExprParser.AddContext ctx);
36     /**
37      * Visit a parse tree produced by the {@code Sub}
38      * labeled alternative in {@link ExprParser#expr}.
39      * @param ctx the parse tree
40      * @return the visitor result
41      */
42     public Variant visitSub(ExprParser.SubContext ctx);
43     /**
44      * Visit a parse tree produced by the {@code Mul}
45      * labeled alternative in {@link ExprParser#expr}.
46      * @param ctx the parse tree
47      * @return the visitor result
48      */
49     public Variant visitMul(ExprParser.MulContext ctx);
50     /**
51      * Visit a parse tree produced by the {@code BracketExpr}
52      * labeled alternative in {@link ExprParser#expr}.
53      * @param ctx the parse tree
54      * @return the visitor result
55      */
56     public Variant visitBracketExpr(ExprParser.BracketExprContext ctx);
57     /**
58      * Visit a parse tree produced by the {@code Int}
59      * labeled alternative in {@link ExprParser#expr}.
60      * @param ctx the parse tree
61      * @return the visitor result
62      */
63     public Variant visitInt(ExprParser.IntContext ctx);
64 }