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

Commit

Permalink
update sdk version
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 Mar 19, 2019
1 parent 834a709 commit 30c82c7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
language: go

go:
- '1.10'
- '1.11'

services:
- docker

env:
- BBLFSHD_VERSION=v2.9.1
- BBLFSHD_VERSION=v2.11.7

install:
- curl -L https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 > $GOPATH/bin/dep
Expand Down
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 = "2.13.x"
version = "2.15.x"

[prune]
go-tests = true
Expand Down
3 changes: 0 additions & 3 deletions driver/fixtures/fixtures_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ var Suite = &fixtures.Suite{
"Stmt_Function",
},
},
Docker: fixtures.DockerConfig{
Image: "php:7",
},
}

func TestPHPDriver(t *testing.T) {
Expand Down
30 changes: 17 additions & 13 deletions driver/normalizer/normalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,24 +100,27 @@ var PreNormilizers = []Mapping{
// Normalizers is the main block of normalization rules to convert native AST to semantic UAST.
var Normalizers = []Mapping{
MapSemantic("Name", uast.Identifier{}, MapObj(
Obj{
uast.KeyToken: Var("name"),
Fields{
{Name: uast.KeyToken, Op: Var("name")},
{Name: "comments", Drop: true, Op: Any()}, // FIXME(dennwc): handle comments
},
Obj{
"Name": Var("name"),
},
)),
MapSemantic("Name", uast.Identifier{}, MapObj(
Obj{
"parts": One(Var("name")),
Fields{
{Name: "parts", Op: One(Var("name"))},
{Name: "comments", Drop: true, Op: Any()}, // FIXME(dennwc): handle comments
},
Obj{
"Name": Var("name"),
},
)),
MapSemantic("Name", uast.QualifiedIdentifier{}, MapObj(
Obj{
"parts": Each("names", Var("name")),
Fields{
{Name: "parts", Op: Each("names", Var("name"))},
{Name: "comments", Drop: true, Op: Any()}, // FIXME(dennwc): handle comments
},
Obj{
"Names": Each("names", UASTType(uast.Identifier{}, Obj{
Expand Down Expand Up @@ -352,15 +355,16 @@ var Normalizers = []Mapping{
},
)),
MapSemantic("Stmt_Function", uast.FunctionGroup{}, MapObj(
Obj{
"byRef": Cases("by_ref",
Fields{
{Name: "byRef", Op: Cases("by_ref",
Bool(false),
Bool(true),
),
"name": Var("name"),
"params": Var("params"),
"returnType": typeCaseLeft("return"),
"stmts": Var("body"),
)},
{Name: "name", Op: Var("name")},
{Name: "params", Op: Var("params")},
{Name: "returnType", Op: typeCaseLeft("return")},
{Name: "stmts", Op: Var("body")},
{Name: "comments", Drop: true, Op: Any()}, // FIXME(dennwc): handle comments
},
Obj{
"Nodes": Arr(
Expand Down

0 comments on commit 30c82c7

Please sign in to comment.