Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Phodal
Coca
提交
39c7c01b
C
Coca
项目概览
Phodal
/
Coca
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Coca
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
39c7c01b
编写于
10月 28, 2019
作者:
P
Phodal HUANG
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: generator visitor
上级
190403d2
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
1797 addition
and
5 deletion
+1797
-5
helloworld.go
helloworld.go
+1
-1
language/README.md
language/README.md
+5
-0
language/java/java_lexer.go
language/java/java_lexer.go
+1
-1
language/java/java_parser.go
language/java/java_parser.go
+1041
-1
language/java/javaparser_base_listener.go
language/java/javaparser_base_listener.go
+1
-1
language/java/javaparser_base_visitor.go
language/java/javaparser_base_visitor.go
+425
-0
language/java/javaparser_listener.go
language/java/javaparser_listener.go
+1
-1
language/java/javaparser_visitor.go
language/java/javaparser_visitor.go
+322
-0
未找到文件。
helloworld.go
浏览文件 @
39c7c01b
...
...
@@ -29,7 +29,7 @@ func analysisPath(codeDir string) {
func
javaFiles
(
codeDir
string
)
[]
string
{
files
:=
make
([]
string
,
0
)
_
=
filepath
.
Walk
(
codeDir
,
func
(
path
string
,
fi
os
.
FileInfo
,
err
error
)
error
{
if
(
strings
.
HasSuffix
(
path
,
".java"
)
&&
!
strings
.
Contains
(
path
,
"Test.java"
)
)
{
if
strings
.
HasSuffix
(
path
,
".java"
)
&&
!
strings
.
Contains
(
path
,
"Test.java"
)
{
files
=
append
(
files
,
path
)
}
return
nil
...
...
language/README.md
0 → 100644
浏览文件 @
39c7c01b
```
antlr -Dlanguage=Go -visitor -listener -lib . JavaParser
```
language/java/java_lexer.go
浏览文件 @
39c7c01b
// Code generated from
java/
JavaLexer.g4 by ANTLR 4.7.2. DO NOT EDIT.
// Code generated from JavaLexer.g4 by ANTLR 4.7.2. DO NOT EDIT.
package
parser
...
...
language/java/java_parser.go
浏览文件 @
39c7c01b
此差异已折叠。
点击以展开。
language/java/javaparser_base_listener.go
浏览文件 @
39c7c01b
// Code generated from
java/
JavaParser.g4 by ANTLR 4.7.2. DO NOT EDIT.
// Code generated from JavaParser.g4 by ANTLR 4.7.2. DO NOT EDIT.
package
parser
// JavaParser
...
...
language/java/javaparser_base_visitor.go
0 → 100644
浏览文件 @
39c7c01b
// Code generated from JavaParser.g4 by ANTLR 4.7.2. DO NOT EDIT.
package
parser
// JavaParser
import
"github.com/antlr/antlr4/runtime/Go/antlr"
type
BaseJavaParserVisitor
struct
{
*
antlr
.
BaseParseTreeVisitor
}
func
(
v
*
BaseJavaParserVisitor
)
VisitCompilationUnit
(
ctx
*
CompilationUnitContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitPackageDeclaration
(
ctx
*
PackageDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitImportDeclaration
(
ctx
*
ImportDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitTypeDeclaration
(
ctx
*
TypeDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitModifier
(
ctx
*
ModifierContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitClassOrInterfaceModifier
(
ctx
*
ClassOrInterfaceModifierContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitVariableModifier
(
ctx
*
VariableModifierContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitClassDeclaration
(
ctx
*
ClassDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitTypeParameters
(
ctx
*
TypeParametersContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitTypeParameter
(
ctx
*
TypeParameterContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitTypeBound
(
ctx
*
TypeBoundContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitEnumDeclaration
(
ctx
*
EnumDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitEnumConstants
(
ctx
*
EnumConstantsContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitEnumConstant
(
ctx
*
EnumConstantContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitEnumBodyDeclarations
(
ctx
*
EnumBodyDeclarationsContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitInterfaceDeclaration
(
ctx
*
InterfaceDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitClassBody
(
ctx
*
ClassBodyContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitInterfaceBody
(
ctx
*
InterfaceBodyContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitClassBodyDeclaration
(
ctx
*
ClassBodyDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitMemberDeclaration
(
ctx
*
MemberDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitMethodDeclaration
(
ctx
*
MethodDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitMethodBody
(
ctx
*
MethodBodyContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitTypeTypeOrVoid
(
ctx
*
TypeTypeOrVoidContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitGenericMethodDeclaration
(
ctx
*
GenericMethodDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitGenericConstructorDeclaration
(
ctx
*
GenericConstructorDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitConstructorDeclaration
(
ctx
*
ConstructorDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitFieldDeclaration
(
ctx
*
FieldDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitInterfaceBodyDeclaration
(
ctx
*
InterfaceBodyDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitInterfaceMemberDeclaration
(
ctx
*
InterfaceMemberDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitConstDeclaration
(
ctx
*
ConstDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitConstantDeclarator
(
ctx
*
ConstantDeclaratorContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitInterfaceMethodDeclaration
(
ctx
*
InterfaceMethodDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitInterfaceMethodModifier
(
ctx
*
InterfaceMethodModifierContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitGenericInterfaceMethodDeclaration
(
ctx
*
GenericInterfaceMethodDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitVariableDeclarators
(
ctx
*
VariableDeclaratorsContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitVariableDeclarator
(
ctx
*
VariableDeclaratorContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitVariableDeclaratorId
(
ctx
*
VariableDeclaratorIdContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitVariableInitializer
(
ctx
*
VariableInitializerContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitArrayInitializer
(
ctx
*
ArrayInitializerContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitClassOrInterfaceType
(
ctx
*
ClassOrInterfaceTypeContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitTypeArgument
(
ctx
*
TypeArgumentContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitQualifiedNameList
(
ctx
*
QualifiedNameListContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitFormalParameters
(
ctx
*
FormalParametersContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitFormalParameterList
(
ctx
*
FormalParameterListContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitFormalParameter
(
ctx
*
FormalParameterContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitLastFormalParameter
(
ctx
*
LastFormalParameterContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitQualifiedName
(
ctx
*
QualifiedNameContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitLiteral
(
ctx
*
LiteralContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitIntegerLiteral
(
ctx
*
IntegerLiteralContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitFloatLiteral
(
ctx
*
FloatLiteralContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitAnnotation
(
ctx
*
AnnotationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitElementValuePairs
(
ctx
*
ElementValuePairsContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitElementValuePair
(
ctx
*
ElementValuePairContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitElementValue
(
ctx
*
ElementValueContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitElementValueArrayInitializer
(
ctx
*
ElementValueArrayInitializerContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitAnnotationTypeDeclaration
(
ctx
*
AnnotationTypeDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitAnnotationTypeBody
(
ctx
*
AnnotationTypeBodyContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitAnnotationTypeElementDeclaration
(
ctx
*
AnnotationTypeElementDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitAnnotationTypeElementRest
(
ctx
*
AnnotationTypeElementRestContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitAnnotationMethodOrConstantRest
(
ctx
*
AnnotationMethodOrConstantRestContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitAnnotationMethodRest
(
ctx
*
AnnotationMethodRestContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitAnnotationConstantRest
(
ctx
*
AnnotationConstantRestContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitDefaultValue
(
ctx
*
DefaultValueContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitBlock
(
ctx
*
BlockContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitBlockStatement
(
ctx
*
BlockStatementContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitLocalVariableDeclaration
(
ctx
*
LocalVariableDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitLocalTypeDeclaration
(
ctx
*
LocalTypeDeclarationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitStatement
(
ctx
*
StatementContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitCatchClause
(
ctx
*
CatchClauseContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitCatchType
(
ctx
*
CatchTypeContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitFinallyBlock
(
ctx
*
FinallyBlockContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitResourceSpecification
(
ctx
*
ResourceSpecificationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitResources
(
ctx
*
ResourcesContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitResource
(
ctx
*
ResourceContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitSwitchBlockStatementGroup
(
ctx
*
SwitchBlockStatementGroupContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitSwitchLabel
(
ctx
*
SwitchLabelContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitForControl
(
ctx
*
ForControlContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitForInit
(
ctx
*
ForInitContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitEnhancedForControl
(
ctx
*
EnhancedForControlContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitParExpression
(
ctx
*
ParExpressionContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitExpressionList
(
ctx
*
ExpressionListContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitMethodCall
(
ctx
*
MethodCallContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitExpression
(
ctx
*
ExpressionContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitLambdaExpression
(
ctx
*
LambdaExpressionContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitLambdaParameters
(
ctx
*
LambdaParametersContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitLambdaBody
(
ctx
*
LambdaBodyContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitPrimary
(
ctx
*
PrimaryContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitClassType
(
ctx
*
ClassTypeContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitCreator
(
ctx
*
CreatorContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitCreatedName
(
ctx
*
CreatedNameContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitInnerCreator
(
ctx
*
InnerCreatorContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitArrayCreatorRest
(
ctx
*
ArrayCreatorRestContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitClassCreatorRest
(
ctx
*
ClassCreatorRestContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitExplicitGenericInvocation
(
ctx
*
ExplicitGenericInvocationContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitTypeArgumentsOrDiamond
(
ctx
*
TypeArgumentsOrDiamondContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitNonWildcardTypeArgumentsOrDiamond
(
ctx
*
NonWildcardTypeArgumentsOrDiamondContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitNonWildcardTypeArguments
(
ctx
*
NonWildcardTypeArgumentsContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitTypeList
(
ctx
*
TypeListContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitTypeType
(
ctx
*
TypeTypeContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitPrimitiveType
(
ctx
*
PrimitiveTypeContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitTypeArguments
(
ctx
*
TypeArgumentsContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitSuperSuffix
(
ctx
*
SuperSuffixContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitExplicitGenericInvocationSuffix
(
ctx
*
ExplicitGenericInvocationSuffixContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
func
(
v
*
BaseJavaParserVisitor
)
VisitArguments
(
ctx
*
ArgumentsContext
)
interface
{}
{
return
v
.
VisitChildren
(
ctx
)
}
language/java/javaparser_listener.go
浏览文件 @
39c7c01b
// Code generated from
java/
JavaParser.g4 by ANTLR 4.7.2. DO NOT EDIT.
// Code generated from JavaParser.g4 by ANTLR 4.7.2. DO NOT EDIT.
package
parser
// JavaParser
...
...
language/java/javaparser_visitor.go
0 → 100644
浏览文件 @
39c7c01b
// Code generated from JavaParser.g4 by ANTLR 4.7.2. DO NOT EDIT.
package
parser
// JavaParser
import
"github.com/antlr/antlr4/runtime/Go/antlr"
// A complete Visitor for a parse tree produced by JavaParser.
type
JavaParserVisitor
interface
{
antlr
.
ParseTreeVisitor
// Visit a parse tree produced by JavaParser#compilationUnit.
VisitCompilationUnit
(
ctx
*
CompilationUnitContext
)
interface
{}
// Visit a parse tree produced by JavaParser#packageDeclaration.
VisitPackageDeclaration
(
ctx
*
PackageDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#importDeclaration.
VisitImportDeclaration
(
ctx
*
ImportDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#typeDeclaration.
VisitTypeDeclaration
(
ctx
*
TypeDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#modifier.
VisitModifier
(
ctx
*
ModifierContext
)
interface
{}
// Visit a parse tree produced by JavaParser#classOrInterfaceModifier.
VisitClassOrInterfaceModifier
(
ctx
*
ClassOrInterfaceModifierContext
)
interface
{}
// Visit a parse tree produced by JavaParser#variableModifier.
VisitVariableModifier
(
ctx
*
VariableModifierContext
)
interface
{}
// Visit a parse tree produced by JavaParser#classDeclaration.
VisitClassDeclaration
(
ctx
*
ClassDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#typeParameters.
VisitTypeParameters
(
ctx
*
TypeParametersContext
)
interface
{}
// Visit a parse tree produced by JavaParser#typeParameter.
VisitTypeParameter
(
ctx
*
TypeParameterContext
)
interface
{}
// Visit a parse tree produced by JavaParser#typeBound.
VisitTypeBound
(
ctx
*
TypeBoundContext
)
interface
{}
// Visit a parse tree produced by JavaParser#enumDeclaration.
VisitEnumDeclaration
(
ctx
*
EnumDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#enumConstants.
VisitEnumConstants
(
ctx
*
EnumConstantsContext
)
interface
{}
// Visit a parse tree produced by JavaParser#enumConstant.
VisitEnumConstant
(
ctx
*
EnumConstantContext
)
interface
{}
// Visit a parse tree produced by JavaParser#enumBodyDeclarations.
VisitEnumBodyDeclarations
(
ctx
*
EnumBodyDeclarationsContext
)
interface
{}
// Visit a parse tree produced by JavaParser#interfaceDeclaration.
VisitInterfaceDeclaration
(
ctx
*
InterfaceDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#classBody.
VisitClassBody
(
ctx
*
ClassBodyContext
)
interface
{}
// Visit a parse tree produced by JavaParser#interfaceBody.
VisitInterfaceBody
(
ctx
*
InterfaceBodyContext
)
interface
{}
// Visit a parse tree produced by JavaParser#classBodyDeclaration.
VisitClassBodyDeclaration
(
ctx
*
ClassBodyDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#memberDeclaration.
VisitMemberDeclaration
(
ctx
*
MemberDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#methodDeclaration.
VisitMethodDeclaration
(
ctx
*
MethodDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#methodBody.
VisitMethodBody
(
ctx
*
MethodBodyContext
)
interface
{}
// Visit a parse tree produced by JavaParser#typeTypeOrVoid.
VisitTypeTypeOrVoid
(
ctx
*
TypeTypeOrVoidContext
)
interface
{}
// Visit a parse tree produced by JavaParser#genericMethodDeclaration.
VisitGenericMethodDeclaration
(
ctx
*
GenericMethodDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#genericConstructorDeclaration.
VisitGenericConstructorDeclaration
(
ctx
*
GenericConstructorDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#constructorDeclaration.
VisitConstructorDeclaration
(
ctx
*
ConstructorDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#fieldDeclaration.
VisitFieldDeclaration
(
ctx
*
FieldDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#interfaceBodyDeclaration.
VisitInterfaceBodyDeclaration
(
ctx
*
InterfaceBodyDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#interfaceMemberDeclaration.
VisitInterfaceMemberDeclaration
(
ctx
*
InterfaceMemberDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#constDeclaration.
VisitConstDeclaration
(
ctx
*
ConstDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#constantDeclarator.
VisitConstantDeclarator
(
ctx
*
ConstantDeclaratorContext
)
interface
{}
// Visit a parse tree produced by JavaParser#interfaceMethodDeclaration.
VisitInterfaceMethodDeclaration
(
ctx
*
InterfaceMethodDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#interfaceMethodModifier.
VisitInterfaceMethodModifier
(
ctx
*
InterfaceMethodModifierContext
)
interface
{}
// Visit a parse tree produced by JavaParser#genericInterfaceMethodDeclaration.
VisitGenericInterfaceMethodDeclaration
(
ctx
*
GenericInterfaceMethodDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#variableDeclarators.
VisitVariableDeclarators
(
ctx
*
VariableDeclaratorsContext
)
interface
{}
// Visit a parse tree produced by JavaParser#variableDeclarator.
VisitVariableDeclarator
(
ctx
*
VariableDeclaratorContext
)
interface
{}
// Visit a parse tree produced by JavaParser#variableDeclaratorId.
VisitVariableDeclaratorId
(
ctx
*
VariableDeclaratorIdContext
)
interface
{}
// Visit a parse tree produced by JavaParser#variableInitializer.
VisitVariableInitializer
(
ctx
*
VariableInitializerContext
)
interface
{}
// Visit a parse tree produced by JavaParser#arrayInitializer.
VisitArrayInitializer
(
ctx
*
ArrayInitializerContext
)
interface
{}
// Visit a parse tree produced by JavaParser#classOrInterfaceType.
VisitClassOrInterfaceType
(
ctx
*
ClassOrInterfaceTypeContext
)
interface
{}
// Visit a parse tree produced by JavaParser#typeArgument.
VisitTypeArgument
(
ctx
*
TypeArgumentContext
)
interface
{}
// Visit a parse tree produced by JavaParser#qualifiedNameList.
VisitQualifiedNameList
(
ctx
*
QualifiedNameListContext
)
interface
{}
// Visit a parse tree produced by JavaParser#formalParameters.
VisitFormalParameters
(
ctx
*
FormalParametersContext
)
interface
{}
// Visit a parse tree produced by JavaParser#formalParameterList.
VisitFormalParameterList
(
ctx
*
FormalParameterListContext
)
interface
{}
// Visit a parse tree produced by JavaParser#formalParameter.
VisitFormalParameter
(
ctx
*
FormalParameterContext
)
interface
{}
// Visit a parse tree produced by JavaParser#lastFormalParameter.
VisitLastFormalParameter
(
ctx
*
LastFormalParameterContext
)
interface
{}
// Visit a parse tree produced by JavaParser#qualifiedName.
VisitQualifiedName
(
ctx
*
QualifiedNameContext
)
interface
{}
// Visit a parse tree produced by JavaParser#literal.
VisitLiteral
(
ctx
*
LiteralContext
)
interface
{}
// Visit a parse tree produced by JavaParser#integerLiteral.
VisitIntegerLiteral
(
ctx
*
IntegerLiteralContext
)
interface
{}
// Visit a parse tree produced by JavaParser#floatLiteral.
VisitFloatLiteral
(
ctx
*
FloatLiteralContext
)
interface
{}
// Visit a parse tree produced by JavaParser#annotation.
VisitAnnotation
(
ctx
*
AnnotationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#elementValuePairs.
VisitElementValuePairs
(
ctx
*
ElementValuePairsContext
)
interface
{}
// Visit a parse tree produced by JavaParser#elementValuePair.
VisitElementValuePair
(
ctx
*
ElementValuePairContext
)
interface
{}
// Visit a parse tree produced by JavaParser#elementValue.
VisitElementValue
(
ctx
*
ElementValueContext
)
interface
{}
// Visit a parse tree produced by JavaParser#elementValueArrayInitializer.
VisitElementValueArrayInitializer
(
ctx
*
ElementValueArrayInitializerContext
)
interface
{}
// Visit a parse tree produced by JavaParser#annotationTypeDeclaration.
VisitAnnotationTypeDeclaration
(
ctx
*
AnnotationTypeDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#annotationTypeBody.
VisitAnnotationTypeBody
(
ctx
*
AnnotationTypeBodyContext
)
interface
{}
// Visit a parse tree produced by JavaParser#annotationTypeElementDeclaration.
VisitAnnotationTypeElementDeclaration
(
ctx
*
AnnotationTypeElementDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#annotationTypeElementRest.
VisitAnnotationTypeElementRest
(
ctx
*
AnnotationTypeElementRestContext
)
interface
{}
// Visit a parse tree produced by JavaParser#annotationMethodOrConstantRest.
VisitAnnotationMethodOrConstantRest
(
ctx
*
AnnotationMethodOrConstantRestContext
)
interface
{}
// Visit a parse tree produced by JavaParser#annotationMethodRest.
VisitAnnotationMethodRest
(
ctx
*
AnnotationMethodRestContext
)
interface
{}
// Visit a parse tree produced by JavaParser#annotationConstantRest.
VisitAnnotationConstantRest
(
ctx
*
AnnotationConstantRestContext
)
interface
{}
// Visit a parse tree produced by JavaParser#defaultValue.
VisitDefaultValue
(
ctx
*
DefaultValueContext
)
interface
{}
// Visit a parse tree produced by JavaParser#block.
VisitBlock
(
ctx
*
BlockContext
)
interface
{}
// Visit a parse tree produced by JavaParser#blockStatement.
VisitBlockStatement
(
ctx
*
BlockStatementContext
)
interface
{}
// Visit a parse tree produced by JavaParser#localVariableDeclaration.
VisitLocalVariableDeclaration
(
ctx
*
LocalVariableDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#localTypeDeclaration.
VisitLocalTypeDeclaration
(
ctx
*
LocalTypeDeclarationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#statement.
VisitStatement
(
ctx
*
StatementContext
)
interface
{}
// Visit a parse tree produced by JavaParser#catchClause.
VisitCatchClause
(
ctx
*
CatchClauseContext
)
interface
{}
// Visit a parse tree produced by JavaParser#catchType.
VisitCatchType
(
ctx
*
CatchTypeContext
)
interface
{}
// Visit a parse tree produced by JavaParser#finallyBlock.
VisitFinallyBlock
(
ctx
*
FinallyBlockContext
)
interface
{}
// Visit a parse tree produced by JavaParser#resourceSpecification.
VisitResourceSpecification
(
ctx
*
ResourceSpecificationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#resources.
VisitResources
(
ctx
*
ResourcesContext
)
interface
{}
// Visit a parse tree produced by JavaParser#resource.
VisitResource
(
ctx
*
ResourceContext
)
interface
{}
// Visit a parse tree produced by JavaParser#switchBlockStatementGroup.
VisitSwitchBlockStatementGroup
(
ctx
*
SwitchBlockStatementGroupContext
)
interface
{}
// Visit a parse tree produced by JavaParser#switchLabel.
VisitSwitchLabel
(
ctx
*
SwitchLabelContext
)
interface
{}
// Visit a parse tree produced by JavaParser#forControl.
VisitForControl
(
ctx
*
ForControlContext
)
interface
{}
// Visit a parse tree produced by JavaParser#forInit.
VisitForInit
(
ctx
*
ForInitContext
)
interface
{}
// Visit a parse tree produced by JavaParser#enhancedForControl.
VisitEnhancedForControl
(
ctx
*
EnhancedForControlContext
)
interface
{}
// Visit a parse tree produced by JavaParser#parExpression.
VisitParExpression
(
ctx
*
ParExpressionContext
)
interface
{}
// Visit a parse tree produced by JavaParser#expressionList.
VisitExpressionList
(
ctx
*
ExpressionListContext
)
interface
{}
// Visit a parse tree produced by JavaParser#methodCall.
VisitMethodCall
(
ctx
*
MethodCallContext
)
interface
{}
// Visit a parse tree produced by JavaParser#expression.
VisitExpression
(
ctx
*
ExpressionContext
)
interface
{}
// Visit a parse tree produced by JavaParser#lambdaExpression.
VisitLambdaExpression
(
ctx
*
LambdaExpressionContext
)
interface
{}
// Visit a parse tree produced by JavaParser#lambdaParameters.
VisitLambdaParameters
(
ctx
*
LambdaParametersContext
)
interface
{}
// Visit a parse tree produced by JavaParser#lambdaBody.
VisitLambdaBody
(
ctx
*
LambdaBodyContext
)
interface
{}
// Visit a parse tree produced by JavaParser#primary.
VisitPrimary
(
ctx
*
PrimaryContext
)
interface
{}
// Visit a parse tree produced by JavaParser#classType.
VisitClassType
(
ctx
*
ClassTypeContext
)
interface
{}
// Visit a parse tree produced by JavaParser#creator.
VisitCreator
(
ctx
*
CreatorContext
)
interface
{}
// Visit a parse tree produced by JavaParser#createdName.
VisitCreatedName
(
ctx
*
CreatedNameContext
)
interface
{}
// Visit a parse tree produced by JavaParser#innerCreator.
VisitInnerCreator
(
ctx
*
InnerCreatorContext
)
interface
{}
// Visit a parse tree produced by JavaParser#arrayCreatorRest.
VisitArrayCreatorRest
(
ctx
*
ArrayCreatorRestContext
)
interface
{}
// Visit a parse tree produced by JavaParser#classCreatorRest.
VisitClassCreatorRest
(
ctx
*
ClassCreatorRestContext
)
interface
{}
// Visit a parse tree produced by JavaParser#explicitGenericInvocation.
VisitExplicitGenericInvocation
(
ctx
*
ExplicitGenericInvocationContext
)
interface
{}
// Visit a parse tree produced by JavaParser#typeArgumentsOrDiamond.
VisitTypeArgumentsOrDiamond
(
ctx
*
TypeArgumentsOrDiamondContext
)
interface
{}
// Visit a parse tree produced by JavaParser#nonWildcardTypeArgumentsOrDiamond.
VisitNonWildcardTypeArgumentsOrDiamond
(
ctx
*
NonWildcardTypeArgumentsOrDiamondContext
)
interface
{}
// Visit a parse tree produced by JavaParser#nonWildcardTypeArguments.
VisitNonWildcardTypeArguments
(
ctx
*
NonWildcardTypeArgumentsContext
)
interface
{}
// Visit a parse tree produced by JavaParser#typeList.
VisitTypeList
(
ctx
*
TypeListContext
)
interface
{}
// Visit a parse tree produced by JavaParser#typeType.
VisitTypeType
(
ctx
*
TypeTypeContext
)
interface
{}
// Visit a parse tree produced by JavaParser#primitiveType.
VisitPrimitiveType
(
ctx
*
PrimitiveTypeContext
)
interface
{}
// Visit a parse tree produced by JavaParser#typeArguments.
VisitTypeArguments
(
ctx
*
TypeArgumentsContext
)
interface
{}
// Visit a parse tree produced by JavaParser#superSuffix.
VisitSuperSuffix
(
ctx
*
SuperSuffixContext
)
interface
{}
// Visit a parse tree produced by JavaParser#explicitGenericInvocationSuffix.
VisitExplicitGenericInvocationSuffix
(
ctx
*
ExplicitGenericInvocationSuffixContext
)
interface
{}
// Visit a parse tree produced by JavaParser#arguments.
VisitArguments
(
ctx
*
ArgumentsContext
)
interface
{}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录