logoalt Hacker News

omoikanetoday at 7:35 PM1 replyview on HN

> any UTF-8 text (without byte-order marker) defines a valid Om program.

What is the behavior of a program with unmatched braces? I am not sure a stray `}` would fit any of the defined syntax.

https://www.om-language.com/index.html#language__syntax__


Replies

itishappytoday at 7:40 PM

That would be parsed as a single operator and evaluated using the following rule:

> Evaluates to the operation defined for the operator in the environment. If none, evaluates to a constant function that pushes the operator, followed by all input terms, onto the output program.

I believe it would simply output itself.