It is possible to overide rebol system words like print, make etc., so is it possible to do the same with the path operator ? Then what’s the syntax ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Another possible approach is to use REBOL meta-programming capabilities and preprocess your own code to catch path accesses and add your handler code. Here’s an example :
This will give you :
Another (slower but more flexible) approach could also be to pass your code in string mode to the preprocessor allowing freeing yourself from any REBOL specific syntax rule like in :
The preprocessor code would then spot all .. places and change the code to properly insert calls to ‘apply-my-rule, and would in the end, run the code with :
There’s no real limits on how far you can process and change your whole code at runtime (the so-called “block mode” of the first example being the most efficient way).