Comments on: PARSE: new keyword restrictions
As part of the w:parse update, we are removing a few obscure word referencing capabilities:
You cannot use a variable to hold get and set word actions:
a: first [b:]
parse "abc" [a "abc"] << an error now
You cannot use a variable to hold parse commands:
parse "abc" [copie here "abc"] << an error now
Keywords cannot be used as variables:
parse "abc" [copy: "abc"] << an error now
Please tell us immediately if this is a problem for you or your code.
Parse Summary updated.
Thanks, those changes should be a huge relief. It was really disturbing to find out that those hacks were possible. It will be good for us that they go away.|
I agree, they really where side-effects and not really features.
The kind of thing that makes you go mad when you do so unknowingly, trying to figure out why the parse is going astray.
So what kind of error is returned? If it's a bad error, then that may not help debugging much.|
Henrik, you are reading my mind. Better error messages will help a lot here if the user makes a mistake, so they will be added.
Also, interestingly, the above change made one of my tests break... because it used the word END to store the prior index of a parse expression!
Post a Comment:
You can post a comment here. Keep it on-topic.