adobe / json-formula

Query language for JSON documents
http://opensource.adobe.com/json-formula/
Apache License 2.0
19 stars 8 forks source link

Fix number parsing #141

Closed JohnBrinkman closed 5 months ago

JohnBrinkman commented 5 months ago

The grammar correctly defines the construction of numbers, however the implementation doesn't follow the grammar rules. Examples:

Expression current result expected
3e+ 3 error
3e 3 error
3. 3 error
3.e2 300 null (the ".e2" should be a chained expression)
3.toString(@) syntax error "3"
3.2.toString(@) syntax error "3.2"