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

Commit

Permalink
enable language namespace in semantic uast
Browse files Browse the repository at this point in the history
Signed-off-by: Denys Smirnov <denys@sourced.tech>
  • Loading branch information
Denys Smirnov authored and dennwc committed Nov 2, 2018
1 parent 82c8973 commit f6ebaf3
Show file tree
Hide file tree
Showing 104 changed files with 2,887 additions and 2,886 deletions.
6 changes: 3 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[[constraint]]
name = "gopkg.in/bblfsh/sdk.v2"
version = "v2.5.x"
version = "v2.6.x"

[prune]
go-tests = true
Expand Down
1 change: 1 addition & 0 deletions driver/normalizer/transforms.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package normalizer
import "gopkg.in/bblfsh/sdk.v2/driver"

var Transforms = driver.Transforms{
Namespace: "python",
Preprocess: Preprocess,
Normalize: Normalize,
Annotations: Native,
Expand Down
12 changes: 6 additions & 6 deletions fixtures/_integration.py.sem.uast
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ '@type': "Module",
{ '@type': "python:Module",
'@role': [File, Module],
'@pos': { '@type': "uast:Positions",
},
body: [
{ '@type': "ClassDef",
{ '@type': "python:ClassDef",
'@token': "testcls1",
'@role': [Declaration, Identifier, Statement, Type],
'@pos': { '@type': "uast:Positions",
Expand All @@ -18,14 +18,14 @@
col: 15,
},
},
bases: { '@type': "ClassDef.bases",
bases: { '@type': "python:ClassDef.bases",
'@role': [Base, Declaration, Type],
bases: [],
},
body: { '@type': "ClassDef.body",
body: { '@type': "python:ClassDef.body",
'@role': [Body, Declaration, Type],
'body_stmts': [
{ '@type': "Pass",
{ '@type': "python:Pass",
'@token': "pass",
'@role': [Noop, Statement],
'@pos': { '@type': "uast:Positions",
Expand All @@ -43,7 +43,7 @@
},
],
},
'decorator_list': { '@type': "ClassDef.decorator_list",
'decorator_list': { '@type': "python:ClassDef.decorator_list",
'@role': [Call, Declaration, Incomplete, Type],
decorators: [],
},
Expand Down
12 changes: 6 additions & 6 deletions fixtures/annotations.py.sem.uast
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ '@type': "Module",
{ '@type': "python:Module",
'@role': [File, Module],
'@pos': { '@type': "uast:Positions",
},
body: [
{ '@type': "AnnAssign",
{ '@type': "python:AnnAssign",
'@role': [Assignment, Binary, Operator],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand Down Expand Up @@ -43,7 +43,7 @@
},
Name: "a",
},
value: { '@type': "Num",
value: { '@type': "python:Num",
'@token': 1,
'@role': [Expression, Literal, Number, Primitive],
'@pos': { '@type': "uast:Positions",
Expand All @@ -60,7 +60,7 @@
},
},
},
{ '@type': "AnnAssign",
{ '@type': "python:AnnAssign",
'@role': [Assignment, Binary, Operator],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand Down Expand Up @@ -126,7 +126,7 @@
Node: { '@type': "uast:Function",
Body: { '@type': "uast:Block",
Statements: [
{ '@type': "Return",
{ '@type': "python:Return",
'@token': "return",
'@role': [Return, Statement],
'@pos': { '@type': "uast:Positions",
Expand All @@ -141,7 +141,7 @@
col: 11,
},
},
value: { '@type': "Num",
value: { '@type': "python:Num",
'@token': 0,
'@role': [Expression, Literal, Number, Primitive],
'@pos': { '@type': "uast:Positions",
Expand Down
Loading

0 comments on commit f6ebaf3

Please sign in to comment.