albertoventurini / graphdb-intellij-plugin

Graph database plugin for the IntelliJ Platform
https://plugins.jetbrains.com/plugin/20417-graph-database
Apache License 2.0
52 stars 15 forks source link

Scientific (exponential) notation #52

Open j3ns opened 1 year ago

j3ns commented 1 year ago

Allow numbers to be written in queries in scientific (exponential) notation, e.g. 1e6 instead of 1000000.

j3ns commented 1 year ago

Lexing numbers in this plugin seems to be too simplified at the moment compared to the Neo4j (v5.3) Cypher parser. Please implement a pragmatic solution which allows the scientific notation and hex numbers.

albertoventurini commented 1 year ago

Hi @j3ns, thank you for pointing me in the right direction with the link to Neo4j's javacc file. I ported the definition of decimal doubles to this plugin. I also added token definitions for hex and octal numbers.