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 4b6dbe9 commit 6739710
Show file tree
Hide file tree
Showing 108 changed files with 1,230 additions and 1,229 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: "javascript",
Preprocess: Preprocess,
Normalize: Normalize,
Annotations: Native,
Expand Down
14 changes: 7 additions & 7 deletions fixtures/_integration.js.sem.uast
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ '@type': "File",
{ '@type': "javascript:File",
'@role': [File],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -13,7 +13,7 @@
},
},
comments: [],
program: { '@type': "Program",
program: { '@type': "javascript:Program",
'@role': [Module],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -28,7 +28,7 @@
},
},
body: [
{ '@type': "VariableDeclaration",
{ '@type': "javascript:VariableDeclaration",
'@role': [Declaration, Statement, Variable],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -43,7 +43,7 @@
},
},
declarations: [
{ '@type': "VariableDeclarator",
{ '@type': "javascript:VariableDeclarator",
'@role': [Declaration, Variable],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand Down Expand Up @@ -72,7 +72,7 @@
},
Name: "x",
},
init: { '@type': "ObjectExpression",
init: { '@type': "javascript:ObjectExpression",
'@role': [Expression, Initialization, Literal, Map],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -87,7 +87,7 @@
},
},
properties: [
{ '@type': "ObjectProperty",
{ '@type': "javascript:ObjectProperty",
'@role': [Map],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand Down Expand Up @@ -120,7 +120,7 @@
},
method: false,
shorthand: false,
value: { '@type': "NumericLiteral",
value: { '@type': "javascript:NumericLiteral",
'@token': 0,
'@role': [Expression, Literal, Map, Number, Value],
'@pos': { '@type': "uast:Positions",
Expand Down
12 changes: 6 additions & 6 deletions fixtures/array-expression.js.sem.uast
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ '@type': "File",
{ '@type': "javascript:File",
'@role': [File],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -13,7 +13,7 @@
},
},
comments: [],
program: { '@type': "Program",
program: { '@type': "javascript:Program",
'@role': [Module],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -28,7 +28,7 @@
},
},
body: [
{ '@type': "ExpressionStatement",
{ '@type': "javascript:ExpressionStatement",
'@role': [Statement],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -42,7 +42,7 @@
col: 7,
},
},
expression: { '@type': "ArrayExpression",
expression: { '@type': "javascript:ArrayExpression",
'@role': [Expression, Initialization, List, Literal],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -57,7 +57,7 @@
},
},
elements: [
{ '@type': "NumericLiteral",
{ '@type': "javascript:NumericLiteral",
'@token': 1,
'@role': [Expression, Literal, Number],
'@pos': { '@type': "uast:Positions",
Expand All @@ -73,7 +73,7 @@
},
},
},
{ '@type': "NumericLiteral",
{ '@type': "javascript:NumericLiteral",
'@token': 2,
'@role': [Expression, Literal, Number],
'@pos': { '@type': "uast:Positions",
Expand Down
16 changes: 8 additions & 8 deletions fixtures/array-pattern.js.sem.uast
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ '@type': "File",
{ '@type': "javascript:File",
'@role': [File],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -13,7 +13,7 @@
},
},
comments: [],
program: { '@type': "Program",
program: { '@type': "javascript:Program",
'@role': [Module],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -28,7 +28,7 @@
},
},
body: [
{ '@type': "ExpressionStatement",
{ '@type': "javascript:ExpressionStatement",
'@role': [Statement],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -42,7 +42,7 @@
col: 16,
},
},
expression: { '@type': "AssignmentExpression",
expression: { '@type': "javascript:AssignmentExpression",
'@role': [Assignment, Binary, Expression, Operator],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -56,7 +56,7 @@
col: 16,
},
},
left: { '@type': "ArrayPattern",
left: { '@type': "javascript:ArrayPattern",
'@role': [Assignment, Binary, Incomplete, Left, List],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand Down Expand Up @@ -107,7 +107,7 @@
'@token': "=",
'@role': [Assignment, Binary, Expression, Operator],
},
right: { '@type': "ArrayExpression",
right: { '@type': "javascript:ArrayExpression",
'@role': [Assignment, Binary, Expression, Initialization, List, Literal, Right],
'@pos': { '@type': "uast:Positions",
start: { '@type': "uast:Position",
Expand All @@ -122,7 +122,7 @@
},
},
elements: [
{ '@type': "NumericLiteral",
{ '@type': "javascript:NumericLiteral",
'@token': 3,
'@role': [Expression, Literal, Number],
'@pos': { '@type': "uast:Positions",
Expand All @@ -138,7 +138,7 @@
},
},
},
{ '@type': "NumericLiteral",
{ '@type': "javascript:NumericLiteral",
'@token': 4,
'@role': [Expression, Literal, Number],
'@pos': { '@type': "uast:Positions",
Expand Down
Loading

0 comments on commit 6739710

Please sign in to comment.