Skip to content

Commit

Permalink
dont use ES6 syntax in grammar (#21)
Browse files Browse the repository at this point in the history
* dont use ES6 syntax in grammar

In c8b9e2 we removed transpilation to ES5, which broke Charts e2e tests.

* Update grammar.pegjs

Co-Authored-By: Scott Sidwell <38820281+scottsidwell@users.noreply.github.com>

Co-authored-by: Scott Sidwell <38820281+scottsidwell@users.noreply.github.com>
  • Loading branch information
rueckstiess and scottsidwell committed Jan 29, 2020
1 parent e60f257 commit ffb85e7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/mongodb-language-model/grammar.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,17 @@ geometry_point
distance:(
value_separator quotation_mark operator:distance_operator quotation_mark
name_separator value:number_positive
{ return { [operator]: value }; }
{
var result = {};
result[operator] = value;
return result;
}
)*
end_object
{
return {
"$geometry": geometry,
...(distance ? distance : {})
};
var result = distance || {};
distance.$geometry = geometry;
return result;
}

geometry_type
Expand Down

0 comments on commit ffb85e7

Please sign in to comment.