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

Commit 422dc3a

Browse files
authored
Merge pull request #38 from mcarmonaa/fix/naming
renaming due to changes in bblfsh/sdk/protocol
2 parents 8dfe832 + 23d3a1a commit 422dc3a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

driver/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ var build string
1111

1212
func main() {
1313
d := driver.Driver{
14-
Version: version,
15-
Build: build,
16-
UASTParserBuilder: normalizer.UASTParserBuilder,
17-
Annotate: normalizer.AnnotationRules,
14+
Version: version,
15+
Build: build,
16+
ParserBuilder: normalizer.ParserBuilder,
17+
Annotate: normalizer.AnnotationRules,
1818
}
1919
d.Exec()
2020
}

driver/normalizer/parser.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,22 @@ var ToNoder = &native.ObjectToNoder{
7575
// FIXME: test[ast_type=Compare].comparators is a list?? (should be "right")
7676
}
7777

78-
func transformationParser(opts driver.UASTParserOptions) (tr driver.UASTParser, err error) {
78+
func transformationParser(opts driver.ParserOptions) (tr driver.Parser, err error) {
7979
parser, err := native.ExecParser(ToNoder, opts.NativeBin)
8080
if err != nil {
8181
return tr, err
8282
}
8383

84-
tr = &driver.TransformationUASTParser{
85-
UASTParser: parser,
84+
tr = &driver.TransformationParser{
85+
Parser: parser,
8686
Transformation: driver.FillOffsetFromLineCol,
8787
}
8888

8989
return tr, nil
9090
}
9191

92-
// UASTParserBuilder creates a parser that transform source code files into *uast.Node.
93-
func UASTParserBuilder(opts driver.UASTParserOptions) (driver.UASTParser, error) {
92+
// ParserBuilder creates a parser that transform source code files into *uast.Node.
93+
func ParserBuilder(opts driver.ParserOptions) (driver.Parser, error) {
9494
parser, err := transformationParser(opts)
9595
if err != nil {
9696
return nil, err

0 commit comments

Comments
 (0)