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

Upgrade to sdk v1 #47

Merged
merged 4 commits into from
Sep 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- docker

before_script:
- go get -v gopkg.in/bblfsh/sdk.v0/...
- go get -v gopkg.in/bblfsh/sdk.v1/...
- bblfsh-sdk prepare-build .
- go get -v -t ./...

Expand Down
298 changes: 149 additions & 149 deletions ANNOTATION.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion driver/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"gopkg.in/bblfsh/sdk.v0/protocol/driver"
"gopkg.in/bblfsh/sdk.v1/protocol/driver"

"github.com/bblfsh/java-driver/driver/normalizer"
)
Expand Down
369 changes: 184 additions & 185 deletions driver/normalizer/annotation.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion driver/normalizer/annotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"

"gopkg.in/bblfsh/sdk.v0/uast"
"gopkg.in/bblfsh/sdk.v1/uast"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion driver/normalizer/jdt/jdt.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package jdt
// GENERATED BY java-driver GoGen
// DO NOT EDIT

import "gopkg.in/bblfsh/sdk.v0/uast/ann"
import "gopkg.in/bblfsh/sdk.v1/uast/ann"

// Eclipse JDT node types.
// This includes all non-abstract classes extending from ASTNode.
Expand Down
4 changes: 2 additions & 2 deletions driver/normalizer/parser.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package normalizer

import (
"gopkg.in/bblfsh/sdk.v0/protocol/driver"
"gopkg.in/bblfsh/sdk.v0/protocol/native"
"gopkg.in/bblfsh/sdk.v1/protocol/driver"
"gopkg.in/bblfsh/sdk.v1/protocol/native"
)

var ToNoder = &native.ObjectToNoder{
Expand Down
2 changes: 1 addition & 1 deletion native/src/test/java/bblfsh/GoGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void generate() {
+ "// GENERATED BY java-driver GoGen\n"
+ "// DO NOT EDIT\n"
+ "\n"
+ "import \"gopkg.in/bblfsh/sdk.v0/uast/ann\"\n\n"
+ "import \"gopkg.in/bblfsh/sdk.v1/uast/ann\"\n\n"
);
out.print(""
+ "// Eclipse JDT node types.\n"
Expand Down
4 changes: 2 additions & 2 deletions tests/annotation_type_declaration.uast
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ CompilationUnit {
. Roles: File
. Children: {
. . 0: AnnotationTypeDeclaration {
. . . Roles: TypeDeclaration,Incomplete
. . . Roles: Declaration,Type,Incomplete
. . . Properties: {
. . . . internalRole: types
. . . }
. . . Children: {
. . . . 0: SimpleName {
. . . . . Roles: SimpleIdentifier,Expression
. . . . . Roles: Expression,Identifier
. . . . . TOKEN "A"
. . . . . StartPosition: {
. . . . . . Offset: 11
Expand Down
12 changes: 6 additions & 6 deletions tests/annotation_type_member_declaration.uast
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ CompilationUnit {
. Roles: File
. Children: {
. . 0: AnnotationTypeDeclaration {
. . . Roles: TypeDeclaration,Incomplete
. . . Roles: Declaration,Type,Incomplete
. . . Properties: {
. . . . internalRole: types
. . . }
. . . Children: {
. . . . 0: SimpleName {
. . . . . Roles: SimpleIdentifier,Expression
. . . . . Roles: Expression,Identifier
. . . . . TOKEN "A"
. . . . . StartPosition: {
. . . . . . Offset: 11
Expand All @@ -28,13 +28,13 @@ CompilationUnit {
. . . . . }
. . . . }
. . . . 1: AnnotationTypeMemberDeclaration {
. . . . . Roles: TypeDeclarationBody,Incomplete
. . . . . Roles: Body,Declaration,Type,Incomplete
. . . . . Properties: {
. . . . . . internalRole: bodyDeclarations
. . . . . }
. . . . . Children: {
. . . . . . 0: PrimitiveType {
. . . . . . . Roles: Incomplete
. . . . . . . Roles: Type,Primitive
. . . . . . . TOKEN "int"
. . . . . . . StartPosition: {
. . . . . . . . Offset: 17
Expand All @@ -51,7 +51,7 @@ CompilationUnit {
. . . . . . . }
. . . . . . }
. . . . . . 1: SimpleName {
. . . . . . . Roles: SimpleIdentifier,Expression
. . . . . . . Roles: Expression,Identifier
. . . . . . . TOKEN "a"
. . . . . . . StartPosition: {
. . . . . . . . Offset: 21
Expand All @@ -68,7 +68,7 @@ CompilationUnit {
. . . . . . . }
. . . . . . }
. . . . . . 2: NumberLiteral {
. . . . . . . Roles: NumberLiteral,Expression
. . . . . . . Roles: Expression,Literal,Number
. . . . . . . StartPosition: {
. . . . . . . . Offset: 33
. . . . . . . . Line: 2
Expand Down
34 changes: 17 additions & 17 deletions tests/anonymous_class_declaration.uast
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CompilationUnit {
. Roles: File
. Children: {
. . 0: TypeDeclaration {
. . . Roles: VisibleFromPackage,TypeDeclaration
. . . Roles: Visibility,Package,Declaration,Type
. . . StartPosition: {
. . . . Offset: 0
. . . . Line: 1
Expand All @@ -22,7 +22,7 @@ CompilationUnit {
. . . }
. . . Children: {
. . . . 0: SimpleName {
. . . . . Roles: SimpleIdentifier,Expression
. . . . . Roles: Expression,Identifier
. . . . . TOKEN "A"
. . . . . StartPosition: {
. . . . . . Offset: 10
Expand All @@ -41,7 +41,7 @@ CompilationUnit {
. . . }
. . }
. . 1: TypeDeclaration {
. . . Roles: VisibleFromPackage,TypeDeclaration
. . . Roles: Visibility,Package,Declaration,Type
. . . StartPosition: {
. . . . Offset: 14
. . . . Line: 2
Expand All @@ -58,7 +58,7 @@ CompilationUnit {
. . . }
. . . Children: {
. . . . 0: SimpleName {
. . . . . Roles: SimpleIdentifier,Expression
. . . . . Roles: Expression,Identifier
. . . . . TOKEN "Code"
. . . . . StartPosition: {
. . . . . . Offset: 20
Expand All @@ -75,7 +75,7 @@ CompilationUnit {
. . . . . }
. . . . }
. . . . 1: MethodDeclaration {
. . . . . Roles: VisibleFromPackage,FunctionDeclaration
. . . . . Roles: Visibility,Package,Declaration,Function
. . . . . StartPosition: {
. . . . . . Offset: 29
. . . . . . Line: 3
Expand All @@ -92,7 +92,7 @@ CompilationUnit {
. . . . . }
. . . . . Children: {
. . . . . . 0: PrimitiveType {
. . . . . . . Roles: Incomplete
. . . . . . . Roles: Type,Primitive
. . . . . . . TOKEN "void"
. . . . . . . StartPosition: {
. . . . . . . . Offset: 29
Expand All @@ -109,7 +109,7 @@ CompilationUnit {
. . . . . . . }
. . . . . . }
. . . . . . 1: SimpleName {
. . . . . . . Roles: SimpleIdentifier,Expression,FunctionDeclarationName
. . . . . . . Roles: Expression,Identifier,Function,Name
. . . . . . . TOKEN "code"
. . . . . . . StartPosition: {
. . . . . . . . Offset: 34
Expand All @@ -126,7 +126,7 @@ CompilationUnit {
. . . . . . . }
. . . . . . }
. . . . . . 2: Block {
. . . . . . . Roles: FunctionDeclarationBody,BlockScope,Block,Statement
. . . . . . . Roles: Function,Body,Statement,Block,Scope
. . . . . . . Properties: {
. . . . . . . . internalRole: body
. . . . . . . }
Expand All @@ -138,19 +138,19 @@ CompilationUnit {
. . . . . . . . . }
. . . . . . . . . Children: {
. . . . . . . . . . 0: ClassInstanceCreation {
. . . . . . . . . . . Roles: Call,Expression,Incomplete
. . . . . . . . . . . Roles: Expression,Call,Instance
. . . . . . . . . . . Properties: {
. . . . . . . . . . . . internalRole: expression
. . . . . . . . . . . }
. . . . . . . . . . . Children: {
. . . . . . . . . . . . 0: SimpleType {
. . . . . . . . . . . . . Roles: CallCallee,Incomplete
. . . . . . . . . . . . . Roles: Call,Callee,Type
. . . . . . . . . . . . . Properties: {
. . . . . . . . . . . . . . internalRole: type
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: SimpleName {
. . . . . . . . . . . . . . . Roles: SimpleIdentifier,Expression
. . . . . . . . . . . . . . . Roles: Expression,Identifier
. . . . . . . . . . . . . . . TOKEN "A"
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 51
Expand All @@ -169,13 +169,13 @@ CompilationUnit {
. . . . . . . . . . . . . }
. . . . . . . . . . . . }
. . . . . . . . . . . . 1: AnonymousClassDeclaration {
. . . . . . . . . . . . . Roles: TypeDeclaration,Expression,Incomplete
. . . . . . . . . . . . . Roles: Expression,Declaration,Type,Incomplete
. . . . . . . . . . . . . Properties: {
. . . . . . . . . . . . . . internalRole: anonymousClassDeclaration
. . . . . . . . . . . . . }
. . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . 0: MethodDeclaration {
. . . . . . . . . . . . . . . Roles: VisibleFromWorld,TypeDeclarationBody,FunctionDeclaration
. . . . . . . . . . . . . . . Roles: Visibility,World,Body,Declaration,Function
. . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . Offset: 57
. . . . . . . . . . . . . . . . Line: 4
Expand All @@ -192,7 +192,7 @@ CompilationUnit {
. . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . Children: {
. . . . . . . . . . . . . . . . 0: Modifier {
. . . . . . . . . . . . . . . . . Roles: VisibleFromWorld
. . . . . . . . . . . . . . . . . Roles: Visibility,World
. . . . . . . . . . . . . . . . . TOKEN "public"
. . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . Offset: 57
Expand All @@ -209,7 +209,7 @@ CompilationUnit {
. . . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . 1: PrimitiveType {
. . . . . . . . . . . . . . . . . Roles: Incomplete
. . . . . . . . . . . . . . . . . Roles: Type,Primitive
. . . . . . . . . . . . . . . . . TOKEN "void"
. . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . Offset: 64
Expand All @@ -226,7 +226,7 @@ CompilationUnit {
. . . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . 2: SimpleName {
. . . . . . . . . . . . . . . . . Roles: SimpleIdentifier,Expression,FunctionDeclarationName
. . . . . . . . . . . . . . . . . Roles: Expression,Identifier,Function,Name
. . . . . . . . . . . . . . . . . TOKEN "a"
. . . . . . . . . . . . . . . . . StartPosition: {
. . . . . . . . . . . . . . . . . . Offset: 69
Expand All @@ -243,7 +243,7 @@ CompilationUnit {
. . . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . }
. . . . . . . . . . . . . . . . 3: Block {
. . . . . . . . . . . . . . . . . Roles: FunctionDeclarationBody,BlockScope,Block,Statement
. . . . . . . . . . . . . . . . . Roles: Function,Body,Statement,Block,Scope
. . . . . . . . . . . . . . . . . Properties: {
. . . . . . . . . . . . . . . . . . internalRole: body
. . . . . . . . . . . . . . . . . }
Expand Down
Loading