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

Commit 5596879

Browse files
Denys Smirnovdennwc
authored andcommitted
enable language namespace in semantic uast
Signed-off-by: Denys Smirnov <[email protected]>
1 parent ff0007d commit 5596879

File tree

99 files changed

+943
-942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+943
-942
lines changed

Gopkg.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[[constraint]]
55
name = "gopkg.in/bblfsh/sdk.v2"
6-
version = "v2.5.x"
6+
version = "v2.6.x"
77

88
[prune]
99
go-tests = true

driver/normalizer/transforms.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package normalizer
33
import "gopkg.in/bblfsh/sdk.v2/driver"
44

55
var Transforms = driver.Transforms{
6+
Namespace: "java",
67
Preprocess: Preprocess,
78
Normalize: Normalize,
89
Annotations: Native,

fixtures/_integration.java.sem.uast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ '@type': "CompilationUnit",
1+
{ '@type': "java:CompilationUnit",
22
'@role': [File],
33
'@pos': { '@type': "uast:Positions",
44
start: { '@type': "uast:Position",
@@ -14,7 +14,7 @@
1414
imports: ~,
1515
package: ~,
1616
types: [
17-
{ '@type': "TypeDeclaration",
17+
{ '@type': "java:TypeDeclaration",
1818
'@role': [Declaration, Package, Type, Visibility],
1919
'@pos': { '@type': "uast:Positions",
2020
start: { '@type': "uast:Position",

fixtures/annotation_type_member_declaration.java.sem.uast

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ '@type': "CompilationUnit",
1+
{ '@type': "java:CompilationUnit",
22
'@role': [File],
33
'@pos': { '@type': "uast:Positions",
44
start: { '@type': "uast:Position",
@@ -14,7 +14,7 @@
1414
imports: ~,
1515
package: ~,
1616
types: [
17-
{ '@type': "AnnotationTypeDeclaration",
17+
{ '@type': "java:AnnotationTypeDeclaration",
1818
'@role': [Annotation, Declaration, Type],
1919
'@pos': { '@type': "uast:Positions",
2020
start: { '@type': "uast:Position",
@@ -28,7 +28,7 @@
2828
},
2929
},
3030
bodyDeclarations: [
31-
{ '@type': "AnnotationTypeMemberDeclaration",
31+
{ '@type': "java:AnnotationTypeMemberDeclaration",
3232
'@role': [Annotation, Body, Declaration, Type],
3333
'@pos': { '@type': "uast:Positions",
3434
start: { '@type': "uast:Position",
@@ -42,7 +42,7 @@
4242
col: 21,
4343
},
4444
},
45-
default: { '@type': "NumberLiteral",
45+
default: { '@type': "java:NumberLiteral",
4646
'@role': [Expression, Literal, Number],
4747
'@pos': { '@type': "uast:Positions",
4848
start: { '@type': "uast:Position",
@@ -75,7 +75,7 @@
7575
},
7676
Name: "a",
7777
},
78-
type: { '@type': "PrimitiveType",
78+
type: { '@type': "java:PrimitiveType",
7979
'@token': "int",
8080
'@role': [Number, Primitive, Type],
8181
'@pos': { '@type': "uast:Positions",

fixtures/anonymous_class_declaration.java.sem.uast

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ '@type': "CompilationUnit",
1+
{ '@type': "java:CompilationUnit",
22
'@role': [File],
33
'@pos': { '@type': "uast:Positions",
44
start: { '@type': "uast:Position",
@@ -14,7 +14,7 @@
1414
imports: ~,
1515
package: ~,
1616
types: [
17-
{ '@type': "TypeDeclaration",
17+
{ '@type': "java:TypeDeclaration",
1818
'@role': [Declaration, Package, Type, Visibility],
1919
'@pos': { '@type': "uast:Positions",
2020
start: { '@type': "uast:Position",
@@ -76,7 +76,7 @@
7676
},
7777
},
7878
Statements: [
79-
{ '@type': "ExpressionStatement",
79+
{ '@type': "java:ExpressionStatement",
8080
'@role': [Statement],
8181
'@pos': { '@type': "uast:Positions",
8282
start: { '@type': "uast:Position",
@@ -90,7 +90,7 @@
9090
col: 45,
9191
},
9292
},
93-
expression: { '@type': "ClassInstanceCreation",
93+
expression: { '@type': "java:ClassInstanceCreation",
9494
'@role': [Call, Expression, Instance],
9595
'@pos': { '@type': "uast:Positions",
9696
start: { '@type': "uast:Position",
@@ -104,7 +104,7 @@
104104
col: 44,
105105
},
106106
},
107-
anonymousClassDeclaration: { '@type': "AnonymousClassDeclaration",
107+
anonymousClassDeclaration: { '@type': "java:AnonymousClassDeclaration",
108108
'@role': [Anonymous, Declaration, Expression, Type],
109109
'@pos': { '@type': "uast:Positions",
110110
start: { '@type': "uast:Position",
@@ -185,7 +185,7 @@
185185
},
186186
arguments: ~,
187187
expression: ~,
188-
type: { '@type': "SimpleType",
188+
type: { '@type': "java:SimpleType",
189189
'@role': [Call, Callee, Type],
190190
'@pos': { '@type': "uast:Positions",
191191
start: { '@type': "uast:Position",

fixtures/array.java.sem.uast

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ '@type': "CompilationUnit",
1+
{ '@type': "java:CompilationUnit",
22
'@role': [File],
33
'@pos': { '@type': "uast:Positions",
44
start: { '@type': "uast:Position",
@@ -14,7 +14,7 @@
1414
imports: ~,
1515
package: ~,
1616
types: [
17-
{ '@type': "TypeDeclaration",
17+
{ '@type': "java:TypeDeclaration",
1818
'@role': [Declaration, Package, Type, Visibility],
1919
'@pos': { '@type': "uast:Positions",
2020
start: { '@type': "uast:Position",
@@ -76,7 +76,7 @@
7676
},
7777
},
7878
Statements: [
79-
{ '@type': "VariableDeclarationStatement",
79+
{ '@type': "java:VariableDeclarationStatement",
8080
'@role': [Declaration, Statement, Variable],
8181
'@pos': { '@type': "uast:Positions",
8282
start: { '@type': "uast:Position",
@@ -91,7 +91,7 @@
9191
},
9292
},
9393
fragments: [
94-
{ '@type': "VariableDeclarationFragment",
94+
{ '@type': "java:VariableDeclarationFragment",
9595
'@role': [Declaration, Variable],
9696
'@pos': { '@type': "uast:Positions",
9797
start: { '@type': "uast:Position",
@@ -106,7 +106,7 @@
106106
},
107107
},
108108
'extraDimensions2': ~,
109-
initializer: { '@type': "ArrayCreation",
109+
initializer: { '@type': "java:ArrayCreation",
110110
'@role': [Expression, Incomplete],
111111
'@pos': { '@type': "uast:Positions",
112112
start: { '@type': "uast:Position",
@@ -121,7 +121,7 @@
121121
},
122122
},
123123
dimensions: [
124-
{ '@type': "NumberLiteral",
124+
{ '@type': "java:NumberLiteral",
125125
'@role': [Expression, Literal, Number],
126126
'@pos': { '@type': "uast:Positions",
127127
start: { '@type': "uast:Position",
@@ -139,7 +139,7 @@
139139
},
140140
],
141141
initializer: ~,
142-
type: { '@type': "ArrayType",
142+
type: { '@type': "java:ArrayType",
143143
'@role': [List, Primitive, Type],
144144
'@pos': { '@type': "uast:Positions",
145145
start: { '@type': "uast:Position",
@@ -154,7 +154,7 @@
154154
},
155155
},
156156
dimensions: [
157-
{ '@type': "Dimension",
157+
{ '@type': "java:Dimension",
158158
'@role': [Incomplete, Type],
159159
'@pos': { '@type': "uast:Positions",
160160
start: { '@type': "uast:Position",
@@ -171,7 +171,7 @@
171171
annotations: ~,
172172
},
173173
],
174-
elementType: { '@type': "PrimitiveType",
174+
elementType: { '@type': "java:PrimitiveType",
175175
'@token': "int",
176176
'@role': [Number, Primitive, Type],
177177
'@pos': { '@type': "uast:Positions",
@@ -208,7 +208,7 @@
208208
},
209209
],
210210
modifiers: ~,
211-
type: { '@type': "ArrayType",
211+
type: { '@type': "java:ArrayType",
212212
'@role': [List, Primitive, Type],
213213
'@pos': { '@type': "uast:Positions",
214214
start: { '@type': "uast:Position",
@@ -223,7 +223,7 @@
223223
},
224224
},
225225
dimensions: [
226-
{ '@type': "Dimension",
226+
{ '@type': "java:Dimension",
227227
'@role': [Incomplete, Type],
228228
'@pos': { '@type': "uast:Positions",
229229
start: { '@type': "uast:Position",
@@ -240,7 +240,7 @@
240240
annotations: ~,
241241
},
242242
],
243-
elementType: { '@type': "PrimitiveType",
243+
elementType: { '@type': "java:PrimitiveType",
244244
'@token': "int",
245245
'@role': [Number, Primitive, Type],
246246
'@pos': { '@type': "uast:Positions",
@@ -259,7 +259,7 @@
259259
},
260260
},
261261
},
262-
{ '@type': "VariableDeclarationStatement",
262+
{ '@type': "java:VariableDeclarationStatement",
263263
'@role': [Declaration, Statement, Variable],
264264
'@pos': { '@type': "uast:Positions",
265265
start: { '@type': "uast:Position",
@@ -274,7 +274,7 @@
274274
},
275275
},
276276
fragments: [
277-
{ '@type': "VariableDeclarationFragment",
277+
{ '@type': "java:VariableDeclarationFragment",
278278
'@role': [Declaration, Variable],
279279
'@pos': { '@type': "uast:Positions",
280280
start: { '@type': "uast:Position",
@@ -289,7 +289,7 @@
289289
},
290290
},
291291
'extraDimensions2': ~,
292-
initializer: { '@type': "ArrayAccess",
292+
initializer: { '@type': "java:ArrayAccess",
293293
'@role': [Expression, Incomplete],
294294
'@pos': { '@type': "uast:Positions",
295295
start: { '@type': "uast:Position",
@@ -318,7 +318,7 @@
318318
},
319319
Name: "a",
320320
},
321-
index: { '@type': "NumberLiteral",
321+
index: { '@type': "java:NumberLiteral",
322322
'@role': [Expression, Literal, Number],
323323
'@pos': { '@type': "uast:Positions",
324324
start: { '@type': "uast:Position",
@@ -353,7 +353,7 @@
353353
},
354354
],
355355
modifiers: ~,
356-
type: { '@type': "PrimitiveType",
356+
type: { '@type': "java:PrimitiveType",
357357
'@token': "int",
358358
'@role': [Number, Primitive, Type],
359359
'@pos': { '@type': "uast:Positions",

fixtures/array_initializer.java.sem.uast

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ '@type': "CompilationUnit",
1+
{ '@type': "java:CompilationUnit",
22
'@role': [File],
33
'@pos': { '@type': "uast:Positions",
44
start: { '@type': "uast:Position",
@@ -14,7 +14,7 @@
1414
imports: ~,
1515
package: ~,
1616
types: [
17-
{ '@type': "TypeDeclaration",
17+
{ '@type': "java:TypeDeclaration",
1818
'@role': [Declaration, Package, Type, Visibility],
1919
'@pos': { '@type': "uast:Positions",
2020
start: { '@type': "uast:Position",
@@ -76,7 +76,7 @@
7676
},
7777
},
7878
Statements: [
79-
{ '@type': "VariableDeclarationStatement",
79+
{ '@type': "java:VariableDeclarationStatement",
8080
'@role': [Declaration, Statement, Variable],
8181
'@pos': { '@type': "uast:Positions",
8282
start: { '@type': "uast:Position",
@@ -91,7 +91,7 @@
9191
},
9292
},
9393
fragments: [
94-
{ '@type': "VariableDeclarationFragment",
94+
{ '@type': "java:VariableDeclarationFragment",
9595
'@role': [Declaration, Variable],
9696
'@pos': { '@type': "uast:Positions",
9797
start: { '@type': "uast:Position",
@@ -106,7 +106,7 @@
106106
},
107107
},
108108
'extraDimensions2': ~,
109-
initializer: { '@type': "ArrayInitializer",
109+
initializer: { '@type': "java:ArrayInitializer",
110110
'@role': [Expression, List, Literal],
111111
'@pos': { '@type': "uast:Positions",
112112
start: { '@type': "uast:Position",
@@ -121,7 +121,7 @@
121121
},
122122
},
123123
expressions: [
124-
{ '@type': "NumberLiteral",
124+
{ '@type': "java:NumberLiteral",
125125
'@role': [Expression, Literal, Number],
126126
'@pos': { '@type': "uast:Positions",
127127
start: { '@type': "uast:Position",
@@ -157,7 +157,7 @@
157157
},
158158
],
159159
modifiers: ~,
160-
type: { '@type': "ArrayType",
160+
type: { '@type': "java:ArrayType",
161161
'@role': [List, Primitive, Type],
162162
'@pos': { '@type': "uast:Positions",
163163
start: { '@type': "uast:Position",
@@ -172,7 +172,7 @@
172172
},
173173
},
174174
dimensions: [
175-
{ '@type': "Dimension",
175+
{ '@type': "java:Dimension",
176176
'@role': [Incomplete, Type],
177177
'@pos': { '@type': "uast:Positions",
178178
start: { '@type': "uast:Position",
@@ -189,7 +189,7 @@
189189
annotations: ~,
190190
},
191191
],
192-
elementType: { '@type': "PrimitiveType",
192+
elementType: { '@type': "java:PrimitiveType",
193193
'@token': "int",
194194
'@role': [Number, Primitive, Type],
195195
'@pos': { '@type': "uast:Positions",

0 commit comments

Comments
 (0)