prql
prql copied to clipboard
feat: Support underscores in numbers
Completes https://github.com/PRQL/prql/issues/1451
I haven't updated all the various grammars, I think that doesn't need to block (there will be some false errors but no false successes)
The pest is actually kinda difficult; expressing "can't end with an underscore".
Very cool!
I was wondering if for your small example you might want to use 0.000_000_1 rather than 1.000_000_1? Of course that could also be expressed as 1e-7 so perhaps your example is better.
That's what I had — but unfortunately sqlformat-rs messes up the formatting... (Something we should work out separately)
I've now updated the grammars — the only one not updated is the textmate grammar in prql-vscode