未验证 提交 fc4de078 编写于 作者: P Phodal Huang

fix: fix creator annotaion issue

上级 483be10d
......@@ -99,6 +99,7 @@ func TestAnnotation(t *testing.T) {
methodMap[c.Name] = c
}
g.Expect(len(callNodes[0].Annotations)).To(Equal(0))
g.Expect(methodMap["macOsXPositiveTest"].Name).To(Equal("macOsXPositiveTest"))
for _, call := range methodMap["macOsXPositiveTest"].MethodCalls {
......
......@@ -248,7 +248,11 @@ func (s *JavaCallListener) EnterAnnotation(ctx *parser.AnnotationContext) {
currentMethod.Annotations = append(currentMethod.Annotations, annotation)
} else {
annotation := common_listener.BuildAnnotation(ctx)
currentNode.Annotations = append(currentNode.Annotations, annotation)
if currentType == "Creator" {
currentCreatorNode.Annotations = append(currentCreatorNode.Annotations, annotation)
} else {
currentNode.Annotations = append(currentNode.Annotations, annotation)
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册