malloydata / malloy

Malloy is an experimental language for describing data relationships and transformations.
http://www.malloydata.dev
MIT License
1.92k stars 75 forks source link

measure: x is (elevation + elevation).sum() #1631

Open lloydtabb opened 4 months ago

lloydtabb commented 4 months ago
measure: x is (elevation + elevation).sum

is illegal. We get a weird error when parsing and we should probably recommend the syntax

measure: x is source.sum(elevation+elevation)
mtoy-googly-moogly commented 2 months ago

That doesn't parse because it isn't legal syntax. You can't .word() an expression.

When we don't parse things, error messages are not very helpful, including in this case.

Adding special case grammar to catch an illegal sentence someone once wrote is and infinite task, and IMHO we should throw all these on a pile so that when we do address them, we have a chance to address them in a systematic and sensible manner.