未验证 提交 2ae05123 编写于 作者: P Phodal HUANG

docs: update document

上级 56eb1964
......@@ -101,15 +101,20 @@ func (s *JavaCallListener) EnterMethodCall(ctx *MethodCallContext) {
stopLine := ctx.GetStop().GetLine()
stopLinePosition := ctx.GetStop().GetColumn()
fullType := warpTargetFullType(targetType);
fullType := warpTargetFullType(targetType)
if fullType != "" {
jMethodCall := &JMethodCall{fullType, targetType, callee, startLine, startLinePosition, stopLine, stopLinePosition}
jMethodCall := &JMethodCall{removeTarget(fullType), targetType, callee, startLine, startLinePosition, stopLine, stopLinePosition}
methodCalls = append(methodCalls, *jMethodCall)
} else {
}
}
func removeTarget(fullType string) string {
split := strings.Split(fullType, ".")
return strings.Join(split[:len(split)-1], ".")
}
func parseTargetType(ctx *MethodCallContext) string {
var targetCtx = ctx.GetParent().GetChild(0).(antlr.ParseTree)
targetVar := targetCtx.GetText();
......
package models
type JMethodCall struct {
Pkg string
Dlz string
Package string
Class string
MethodName string
StartLine int
StartLinePosition int
StopLine int
StopLinePosition int
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册