Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 18b8daf

Browse files
Denys Smirnovdennwc
authored andcommitted
add a Comment role to the javadoc; fixes #86
Signed-off-by: Denys Smirnov <denys@sourced.tech>
1 parent 3be172c commit 18b8daf

13 files changed

Lines changed: 30 additions & 30 deletions

driver/normalizer/annotation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,8 @@ var Annotations = []Mapping{
496496
AnnotateType("MemberRef", nil, role.Documentation, role.Variable, role.Incomplete),
497497
AnnotateType("MethodRef", nil, role.Documentation, role.Function, role.Incomplete),
498498
AnnotateType("MethodRefParameter", nil, role.Documentation, role.Function, role.Incomplete),
499-
AnnotateType("TagElement", nil, role.Documentation, role.Incomplete),
500-
AnnotateType("TextElement", nil, role.Documentation, role.Incomplete),
499+
AnnotateType("TagElement", nil, role.Comment, role.Documentation, role.Incomplete),
500+
AnnotateType("TextElement", nil, role.Comment, role.Documentation, role.Incomplete),
501501

502502
// Other expressions
503503
AnnotateType("ArrayAccess", nil, role.Expression, role.Incomplete),

fixtures/javadoc.java.sem.uast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
},
8181
tags: [
8282
{ '@type': "java:TagElement",
83-
'@role': [Documentation, Incomplete],
83+
'@role': [Comment, Documentation, Incomplete],
8484
'@pos': { '@type': "uast:Positions",
8585
start: { '@type': "uast:Position",
8686
offset: 4,
@@ -95,7 +95,7 @@
9595
},
9696
fragments: [
9797
{ '@type': "java:TextElement",
98-
'@role': [Documentation, Incomplete],
98+
'@role': [Comment, Documentation, Incomplete],
9999
'@pos': { '@type': "uast:Positions",
100100
start: { '@type': "uast:Position",
101101
offset: 4,

fixtures/javadoc.java.uast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
},
8181
tags: [
8282
{ '@type': "TagElement",
83-
'@role': [Documentation, Incomplete],
83+
'@role': [Comment, Documentation, Incomplete],
8484
'@pos': { '@type': "uast:Positions",
8585
start: { '@type': "uast:Position",
8686
offset: 4,
@@ -95,7 +95,7 @@
9595
},
9696
fragments: [
9797
{ '@type': "TextElement",
98-
'@role': [Documentation, Incomplete],
98+
'@role': [Comment, Documentation, Incomplete],
9999
'@pos': { '@type': "uast:Positions",
100100
start: { '@type': "uast:Position",
101101
offset: 4,

fixtures/member_ref.java.sem.uast

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
tags: [
6262
{ '@type': "java:TagElement",
63-
'@role': [Documentation, Incomplete],
63+
'@role': [Comment, Documentation, Incomplete],
6464
'@pos': { '@type': "uast:Positions",
6565
start: { '@type': "uast:Position",
6666
offset: 19,
@@ -75,7 +75,7 @@
7575
},
7676
fragments: [
7777
{ '@type': "java:TagElement",
78-
'@role': [Documentation, Incomplete],
78+
'@role': [Comment, Documentation, Incomplete],
7979
'@pos': { '@type': "uast:Positions",
8080
start: { '@type': "uast:Position",
8181
offset: 19,
@@ -124,7 +124,7 @@
124124
tagName: "@link",
125125
},
126126
{ '@type': "java:TextElement",
127-
'@role': [Documentation, Incomplete],
127+
'@role': [Comment, Documentation, Incomplete],
128128
'@pos': { '@type': "uast:Positions",
129129
start: { '@type': "uast:Position",
130130
offset: 29,

fixtures/member_ref.java.uast

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
},
7979
tags: [
8080
{ '@type': "TagElement",
81-
'@role': [Documentation, Incomplete],
81+
'@role': [Comment, Documentation, Incomplete],
8282
'@pos': { '@type': "uast:Positions",
8383
start: { '@type': "uast:Position",
8484
offset: 19,
@@ -93,7 +93,7 @@
9393
},
9494
fragments: [
9595
{ '@type': "TagElement",
96-
'@role': [Documentation, Incomplete],
96+
'@role': [Comment, Documentation, Incomplete],
9797
'@pos': { '@type': "uast:Positions",
9898
start: { '@type': "uast:Position",
9999
offset: 19,
@@ -143,7 +143,7 @@
143143
tagName: "@link",
144144
},
145145
{ '@type': "TextElement",
146-
'@role': [Documentation, Incomplete],
146+
'@role': [Comment, Documentation, Incomplete],
147147
'@pos': { '@type': "uast:Positions",
148148
start: { '@type': "uast:Position",
149149
offset: 29,

fixtures/method_ref.java.sem.uast

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
tags: [
6262
{ '@type': "java:TagElement",
63-
'@role': [Documentation, Incomplete],
63+
'@role': [Comment, Documentation, Incomplete],
6464
'@pos': { '@type': "uast:Positions",
6565
start: { '@type': "uast:Position",
6666
offset: 19,
@@ -75,7 +75,7 @@
7575
},
7676
fragments: [
7777
{ '@type': "java:TagElement",
78-
'@role': [Documentation, Incomplete],
78+
'@role': [Comment, Documentation, Incomplete],
7979
'@pos': { '@type': "uast:Positions",
8080
start: { '@type': "uast:Position",
8181
offset: 19,
@@ -174,7 +174,7 @@
174174
tagName: "@link",
175175
},
176176
{ '@type': "java:TextElement",
177-
'@role': [Documentation, Incomplete],
177+
'@role': [Comment, Documentation, Incomplete],
178178
'@pos': { '@type': "uast:Positions",
179179
start: { '@type': "uast:Position",
180180
offset: 39,

fixtures/method_ref.java.uast

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
},
7979
tags: [
8080
{ '@type': "TagElement",
81-
'@role': [Documentation, Incomplete],
81+
'@role': [Comment, Documentation, Incomplete],
8282
'@pos': { '@type': "uast:Positions",
8383
start: { '@type': "uast:Position",
8484
offset: 19,
@@ -93,7 +93,7 @@
9393
},
9494
fragments: [
9595
{ '@type': "TagElement",
96-
'@role': [Documentation, Incomplete],
96+
'@role': [Comment, Documentation, Incomplete],
9797
'@pos': { '@type': "uast:Positions",
9898
start: { '@type': "uast:Position",
9999
offset: 19,
@@ -194,7 +194,7 @@
194194
tagName: "@link",
195195
},
196196
{ '@type': "TextElement",
197-
'@role': [Documentation, Incomplete],
197+
'@role': [Comment, Documentation, Incomplete],
198198
'@pos': { '@type': "uast:Positions",
199199
start: { '@type': "uast:Position",
200200
offset: 39,

fixtures/u2_class_doc.java.sem.uast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
},
4848
tags: [
4949
{ '@type': "java:TagElement",
50-
'@role': [Documentation, Incomplete],
50+
'@role': [Comment, Documentation, Incomplete],
5151
'@pos': { '@type': "uast:Positions",
5252
start: { '@type': "uast:Position",
5353
offset: 7,
@@ -62,7 +62,7 @@
6262
},
6363
fragments: [
6464
{ '@type': "java:TextElement",
65-
'@role': [Documentation, Incomplete],
65+
'@role': [Comment, Documentation, Incomplete],
6666
'@pos': { '@type': "uast:Positions",
6767
start: { '@type': "uast:Position",
6868
offset: 7,

fixtures/u2_class_doc.java.uast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
},
4848
tags: [
4949
{ '@type': "TagElement",
50-
'@role': [Documentation, Incomplete],
50+
'@role': [Comment, Documentation, Incomplete],
5151
'@pos': { '@type': "uast:Positions",
5252
start: { '@type': "uast:Position",
5353
offset: 7,
@@ -62,7 +62,7 @@
6262
},
6363
fragments: [
6464
{ '@type': "TextElement",
65-
'@role': [Documentation, Incomplete],
65+
'@role': [Comment, Documentation, Incomplete],
6666
'@pos': { '@type': "uast:Positions",
6767
start: { '@type': "uast:Position",
6868
offset: 7,

fixtures/u2_func_doc.java.sem.uast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
tags: [
6262
{ '@type': "java:TagElement",
63-
'@role': [Documentation, Incomplete],
63+
'@role': [Comment, Documentation, Incomplete],
6464
'@pos': { '@type': "uast:Positions",
6565
start: { '@type': "uast:Position",
6666
offset: 32,
@@ -75,7 +75,7 @@
7575
},
7676
fragments: [
7777
{ '@type': "java:TextElement",
78-
'@role': [Documentation, Incomplete],
78+
'@role': [Comment, Documentation, Incomplete],
7979
'@pos': { '@type': "uast:Positions",
8080
start: { '@type': "uast:Position",
8181
offset: 32,

0 commit comments

Comments
 (0)