Ohm-S
Ohm-S copied to clipboard
New super-splice operator
In Ohm v15.3.0 a new operator was added: https://github.com/harc/ohm/commit/b519a05bf54da5b9c731130409343dce6cc4153f https://github.com/harc/ohm/blob/master/doc/syntax-reference.md#defining-extending-and-overriding-rules
The super-splice operator (...
) can be used to append and/or prepend cases to the supergrammar rule body. E.g., if the supergrammar defines comment = multiLineComment
, then comment := ... | singleLineComment
is equivalent to comment := multiLineComment | singleLineComment
.