pagoda
pagoda copied to clipboard
Add a `?`operator to pgscript.
Although useful for general scripting, its main purpose is to default missing parameters in node expressions.
For example, features in GeoJSON usually don't have the same set of parameters which makes using them unreliable.
The operator should be:
lhs ? rhs
This operator should check if the lhs symbol exists and if its conversion to a boolean is true, in which case it returns lhs. Otherwise, return rhs.