function-rule: [
into [
set code word! (probe code)
any [integer! | function-rule]
]
]
-hi-there-
hello
function-rule: [
into [
set code word!
any [integer! | function-rule]
(probe code)
]
]
hello
hello
The idea is to have code be like it is in the first rule definition. It makes sense as to why this is happening because code is being overshadowed by the inner definition of code so that the probe call is calling the same word twice. Is there a way to set up context-sensitive words that look the same yet print out different results, I know there is in other cases but what about this case?
Yea, that is pretty much the way they introduce a stack is by parsing parentheses. So I guess it is a bad idea to think about context in this situation?
You could potentially force a context solution but in effect I expect you'll end up with a stack anyway (of contexts) and as @rgchris points out doing so is likely to be costly and tricky (at least right now).
ANY has a new meaning for meaning "any of the rules in the following block", so use OPTIONAL SOME (equivalent to OPT SOME) instead when you mean "any number including zero"
GROUP! is the name for the PAREN! type in Ren-C
I think it's not insignificant that old problems become solvable with new methods--it's worth pointing out. Also I've added this case to the PARSE LET tests.