I'd like to reorganise the arguments block in a given Rebol function to provide a more comprehensible understanding of the arguments required by the function. The arguments block in a Rebol function is a great example of the malleable data structures in Rebol:
adjoin: func [
"Adjoins"
series [series!] "Series to adjoin"
joinee
/local other
][...]
But I need something more predictable to make sense of this metadata. How would I get it to a more compliant format? An example:
[
; should include about value whether the about string is there or not
about none none "Adjoins"
argument series [series!] "Series to Adjoin"
argument joinee none none
option local none none
argument other none none
]
Any thoughts to the transform method or the best way to represent the arguments content would be most helpful.
Here is a complete rebol script which should help you out :-)
Note that the variables do not have to start with a dot, nor do the parse rules require to be surrounded in = signs. Its a quick way to separate the task of each thing within the rules. This way its much easier to identify which word does what, which is especially important when you start to build larger rules.
here is what it prints out: