TelluIoT / ThingML

The ThingML modelling language
https://github.com/TelluIoT/ThingML
Apache License 2.0
101 stars 32 forks source link

No negative integer/double literal #232

Open brice-morin opened 6 years ago

brice-morin commented 6 years ago

-1 or -1.5 seem to be expression including a unary minus and a positive number...

This can be annoying in places where we expect a literal (instead of a generic expression) and where we want this literal to be negative...

jakhog commented 6 years ago

I've thought about this before, but don't remember any example. Do you have a good one?

brice-morin commented 6 years ago

Array initializers, where only literals and property references (to read-only properties) are, at least currently, allowed. But I made the grammar more generic and then added some constraints in the checker.