metaeducation / ren-c

Library for embedding a Rebol interpreter into C codebases
GNU Lesser General Public License v3.0
128 stars 27 forks source link

Generalize "Arrow Words" and fix quoting/setting/etc. #1075

Closed hostilefork closed 4 years ago

hostilefork commented 4 years ago

Words containing < and > have presented historical problems, such as not being able to assign them via >: or quote them with '. There was also an open question about exactly how many forms of words would be allowed, when it would come into conflict with TAG!

This commit patches in a self-contained bit of arrow-word code that lets you build any WORD! you like out of >, <, |, +, -, =. The only rule is that such words cannot both begin with a < and end with a >.

A current special exemption is made for <>, which has a concept for being both a tag and executable that has not yet been done.

See examples in the test The test also exercises transcoding of the SET-WORD!, GET-WORD!, SYM-WORD!, QUOTED! variants, as well as being bumped up against the edges of a block or path.