See https://github.com/sakekasi/python-in-ohm/ for how to do this sort of syntax in Ohm: basically, pre-parse the indents and turn them into otherwise invalid characters such as ⇒ and ⇐ to represent indent and dedent. Then parse these in the normal way.
Rename the two Ursa syntaxes indent and brace (with aliases python and c). If no explicit syntax is given on the command line, parse as brace first and then try as indent if that fails. Same in the REPL.
See https://github.com/sakekasi/python-in-ohm/ for how to do this sort of syntax in Ohm: basically, pre-parse the indents and turn them into otherwise invalid characters such as ⇒ and ⇐ to represent indent and dedent. Then parse these in the normal way.
Rename the two Ursa syntaxes
indent
andbrace
(with aliasespython
andc
). If no explicit syntax is given on the command line, parse asbrace
first and then try asindent
if that fails. Same in the REPL.