grain icon indicating copy to clipboard operation
grain copied to clipboard

feat(compiler): Allow custom infix operators

Open ospencer opened this issue 1 year ago • 0 comments

Closes #1319

I'll use what I wrote in the docs as my PR description 🤓

Grain also allows the definition of custom infix operators. Custom operators in Grain must be prefixed by one of the operators in the table below. Its precedence is defined by its prefix.

In addition to these prefixes, the parser accepts the characters $&*/+-=><^|!?%:. for use in the names of custom operators.

It should be noted that /* and // are disallowed as operators as they denote comments.

ospencer avatar Aug 16 '22 02:08 ospencer