1 Star 0 Fork 1

zcy543814 / GoCompiler_antlr

forked from victayria77 / GoCompiler_antlr 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
GoParserVisitor.java 18.43 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
// Generated from GoParser.g4 by ANTLR 4.9.3
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
/**
* This interface defines a complete generic visitor for a parse tree produced
* by {@link GoParser}.
*
* @param <T> The return type of the visit operation. Use {@link Void} for
* operations with no return type.
*/
public interface GoParserVisitor<T> extends ParseTreeVisitor<T> {
/**
* Visit a parse tree produced by {@link GoParser#sourceFile}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSourceFile(GoParser.SourceFileContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#packageClause}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitPackageClause(GoParser.PackageClauseContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#importDecl}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitImportDecl(GoParser.ImportDeclContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#importSpec}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitImportSpec(GoParser.ImportSpecContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#importPath}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitImportPath(GoParser.ImportPathContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#declaration}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitDeclaration(GoParser.DeclarationContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#constDecl}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitConstDecl(GoParser.ConstDeclContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#constSpec}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitConstSpec(GoParser.ConstSpecContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#identifierList}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitIdentifierList(GoParser.IdentifierListContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#expressionList}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitExpressionList(GoParser.ExpressionListContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#typeDecl}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTypeDecl(GoParser.TypeDeclContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#typeSpec}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTypeSpec(GoParser.TypeSpecContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#functionDecl}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFunctionDecl(GoParser.FunctionDeclContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#methodDecl}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMethodDecl(GoParser.MethodDeclContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#receiver}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitReceiver(GoParser.ReceiverContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#varDecl}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitVarDecl(GoParser.VarDeclContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#varSpec}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitVarSpec(GoParser.VarSpecContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#block}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBlock(GoParser.BlockContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#statementList}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitStatementList(GoParser.StatementListContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#statement}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitStatement(GoParser.StatementContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#simpleStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSimpleStmt(GoParser.SimpleStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#expressionStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitExpressionStmt(GoParser.ExpressionStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#sendStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSendStmt(GoParser.SendStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#incDecStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitIncDecStmt(GoParser.IncDecStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#assignment}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAssignment(GoParser.AssignmentContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#assign_op}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAssign_op(GoParser.Assign_opContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#shortVarDecl}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitShortVarDecl(GoParser.ShortVarDeclContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#emptyStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitEmptyStmt(GoParser.EmptyStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#labeledStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLabeledStmt(GoParser.LabeledStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#returnStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitReturnStmt(GoParser.ReturnStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#breakStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBreakStmt(GoParser.BreakStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#continueStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitContinueStmt(GoParser.ContinueStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#gotoStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitGotoStmt(GoParser.GotoStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#fallthroughStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFallthroughStmt(GoParser.FallthroughStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#deferStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitDeferStmt(GoParser.DeferStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#ifStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitIfStmt(GoParser.IfStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#switchStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSwitchStmt(GoParser.SwitchStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#exprSwitchStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitExprSwitchStmt(GoParser.ExprSwitchStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#exprCaseClause}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitExprCaseClause(GoParser.ExprCaseClauseContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#exprSwitchCase}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitExprSwitchCase(GoParser.ExprSwitchCaseContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#typeSwitchStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTypeSwitchStmt(GoParser.TypeSwitchStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#typeSwitchGuard}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTypeSwitchGuard(GoParser.TypeSwitchGuardContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#typeCaseClause}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTypeCaseClause(GoParser.TypeCaseClauseContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#typeSwitchCase}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTypeSwitchCase(GoParser.TypeSwitchCaseContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#typeList}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTypeList(GoParser.TypeListContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#selectStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSelectStmt(GoParser.SelectStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#commClause}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCommClause(GoParser.CommClauseContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#commCase}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCommCase(GoParser.CommCaseContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#recvStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitRecvStmt(GoParser.RecvStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#forStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitForStmt(GoParser.ForStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#forClause}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitForClause(GoParser.ForClauseContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#rangeClause}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitRangeClause(GoParser.RangeClauseContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#goStmt}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitGoStmt(GoParser.GoStmtContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#type_}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitType_(GoParser.Type_Context ctx);
/**
* Visit a parse tree produced by {@link GoParser#typeName}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTypeName(GoParser.TypeNameContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#typeLit}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTypeLit(GoParser.TypeLitContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#arrayType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitArrayType(GoParser.ArrayTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#arrayLength}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitArrayLength(GoParser.ArrayLengthContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#elementType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitElementType(GoParser.ElementTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#pointerType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitPointerType(GoParser.PointerTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#interfaceType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitInterfaceType(GoParser.InterfaceTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#sliceType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSliceType(GoParser.SliceTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#mapType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMapType(GoParser.MapTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#channelType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitChannelType(GoParser.ChannelTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#methodSpec}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMethodSpec(GoParser.MethodSpecContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#functionType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFunctionType(GoParser.FunctionTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#signature}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSignature(GoParser.SignatureContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#result}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitResult(GoParser.ResultContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#parameters}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitParameters(GoParser.ParametersContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#parameterDecl}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitParameterDecl(GoParser.ParameterDeclContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitExpression(GoParser.ExpressionContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#primaryExpr}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitPrimaryExpr(GoParser.PrimaryExprContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#conversion}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitConversion(GoParser.ConversionContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#nonNamedType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitNonNamedType(GoParser.NonNamedTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#operand}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitOperand(GoParser.OperandContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#literal}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLiteral(GoParser.LiteralContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#basicLit}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBasicLit(GoParser.BasicLitContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#integer}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitInteger(GoParser.IntegerContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#operandName}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitOperandName(GoParser.OperandNameContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#qualifiedIdent}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitQualifiedIdent(GoParser.QualifiedIdentContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#compositeLit}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCompositeLit(GoParser.CompositeLitContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#literalType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLiteralType(GoParser.LiteralTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#literalValue}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLiteralValue(GoParser.LiteralValueContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#elementList}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitElementList(GoParser.ElementListContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#keyedElement}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitKeyedElement(GoParser.KeyedElementContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#key}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitKey(GoParser.KeyContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#element}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitElement(GoParser.ElementContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#structType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitStructType(GoParser.StructTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#fieldDecl}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFieldDecl(GoParser.FieldDeclContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#string_}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitString_(GoParser.String_Context ctx);
/**
* Visit a parse tree produced by {@link GoParser#embeddedField}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitEmbeddedField(GoParser.EmbeddedFieldContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#functionLit}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFunctionLit(GoParser.FunctionLitContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#index}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitIndex(GoParser.IndexContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#slice_}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSlice_(GoParser.Slice_Context ctx);
/**
* Visit a parse tree produced by {@link GoParser#typeAssertion}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTypeAssertion(GoParser.TypeAssertionContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#arguments}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitArguments(GoParser.ArgumentsContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#methodExpr}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitMethodExpr(GoParser.MethodExprContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#receiverType}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitReceiverType(GoParser.ReceiverTypeContext ctx);
/**
* Visit a parse tree produced by {@link GoParser#eos}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitEos(GoParser.EosContext ctx);
}
Java
1
https://gitee.com/zcy543814/go-compiler_antlr.git
git@gitee.com:zcy543814/go-compiler_antlr.git
zcy543814
go-compiler_antlr
GoCompiler_antlr
phase1_simpleExpression

搜索帮助