Skip to content

Commit ecf22e2

Browse files
committed
Parse UAST with semantic mode
Signed-off-by: Carlos Martín <[email protected]>
1 parent fd7a7a3 commit ecf22e2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

server/handler/uast.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,10 @@ func Parse(bbblfshServerURL string) RequestProcessFunc {
5252
Language(req.Language).
5353
Filename(req.Filename).
5454
Content(req.Content).
55+
Mode(bblfsh.Semantic).
5556
Do()
5657
if err != nil {
57-
if bblfshErr, ok := err.(bblfsh.FatalError); ok {
58-
return nil, serializer.NewHTTPError(http.StatusBadRequest, bblfshErr.Error())
59-
}
60-
61-
return nil, err
58+
return nil, serializer.NewHTTPError(http.StatusBadRequest, err.Error())
6259
}
6360

6461
if resp.Status == protocol.Error {

0 commit comments

Comments
 (0)