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

Commit f6ebaf3

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

File tree

104 files changed

+2887
-2886
lines changed

Some content is hidden

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

104 files changed

+2887
-2886
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: "python",
67
Preprocess: Preprocess,
78
Normalize: Normalize,
89
Annotations: Native,

fixtures/_integration.py.sem.uast

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{ '@type': "Module",
1+
{ '@type': "python:Module",
22
'@role': [File, Module],
33
'@pos': { '@type': "uast:Positions",
44
},
55
body: [
6-
{ '@type': "ClassDef",
6+
{ '@type': "python:ClassDef",
77
'@token': "testcls1",
88
'@role': [Declaration, Identifier, Statement, Type],
99
'@pos': { '@type': "uast:Positions",
@@ -18,14 +18,14 @@
1818
col: 15,
1919
},
2020
},
21-
bases: { '@type': "ClassDef.bases",
21+
bases: { '@type': "python:ClassDef.bases",
2222
'@role': [Base, Declaration, Type],
2323
bases: [],
2424
},
25-
body: { '@type': "ClassDef.body",
25+
body: { '@type': "python:ClassDef.body",
2626
'@role': [Body, Declaration, Type],
2727
'body_stmts': [
28-
{ '@type': "Pass",
28+
{ '@type': "python:Pass",
2929
'@token': "pass",
3030
'@role': [Noop, Statement],
3131
'@pos': { '@type': "uast:Positions",
@@ -43,7 +43,7 @@
4343
},
4444
],
4545
},
46-
'decorator_list': { '@type': "ClassDef.decorator_list",
46+
'decorator_list': { '@type': "python:ClassDef.decorator_list",
4747
'@role': [Call, Declaration, Incomplete, Type],
4848
decorators: [],
4949
},

fixtures/annotations.py.sem.uast

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{ '@type': "Module",
1+
{ '@type': "python:Module",
22
'@role': [File, Module],
33
'@pos': { '@type': "uast:Positions",
44
},
55
body: [
6-
{ '@type': "AnnAssign",
6+
{ '@type': "python:AnnAssign",
77
'@role': [Assignment, Binary, Operator],
88
'@pos': { '@type': "uast:Positions",
99
start: { '@type': "uast:Position",
@@ -43,7 +43,7 @@
4343
},
4444
Name: "a",
4545
},
46-
value: { '@type': "Num",
46+
value: { '@type': "python:Num",
4747
'@token': 1,
4848
'@role': [Expression, Literal, Number, Primitive],
4949
'@pos': { '@type': "uast:Positions",
@@ -60,7 +60,7 @@
6060
},
6161
},
6262
},
63-
{ '@type': "AnnAssign",
63+
{ '@type': "python:AnnAssign",
6464
'@role': [Assignment, Binary, Operator],
6565
'@pos': { '@type': "uast:Positions",
6666
start: { '@type': "uast:Position",
@@ -126,7 +126,7 @@
126126
Node: { '@type': "uast:Function",
127127
Body: { '@type': "uast:Block",
128128
Statements: [
129-
{ '@type': "Return",
129+
{ '@type': "python:Return",
130130
'@token': "return",
131131
'@role': [Return, Statement],
132132
'@pos': { '@type': "uast:Positions",
@@ -141,7 +141,7 @@
141141
col: 11,
142142
},
143143
},
144-
value: { '@type': "Num",
144+
value: { '@type': "python:Num",
145145
'@token': 0,
146146
'@role': [Expression, Literal, Number, Primitive],
147147
'@pos': { '@type': "uast:Positions",

0 commit comments

Comments
 (0)