weistn / gismo

Programming language with extensible syntax
3 stars 0 forks source link

Same operator in prefix, infix and postfix notation #4

Open weistn opened 10 years ago

weistn commented 10 years ago

The following should be possible

operator ...a { } operator a... { } operator a...b { }

The postfix variant can only be used at the end of an expression, i.e.

arr[i...]

It is not allowed to write

arr[i... + 4]

because that would trigger the infix variant and this in turn would yield an error.