I have a custom language with its own syntax and parse tree that I currently enter in unique tiddlers containing one or more language statements.
A TW5 wikirule parses the tiddler and returns (w/ added formatting) the TW5 wiki parse tree for rendering. The parser aborts on the first (syntax, etc.) error and the rule adjusts the TW5 parse tree accordingly. Note, the language's unique parse tree is also produced. Ideally, this is the one/only parsing/validation that I want to execute so I want to "keep" the custom language's parse tree.
The appropriately tagged, validated tiddlers created this way are later processed by a macro but I want to avoid re-parsing to acquire the unique parse trees.
I really like the wikirule I developed but I'm unaware of a convenient way to store my unique parse tree.
Assuming the data store is the tiddler's (preferably hidden) "field" with a value of a "stringified" tree, known alternatives include:
* injecting an "action-setfield" into the rule's TW5 parse tree. Early attempts don't show promise.
* using a custom widget to wrap the "statements". Not as friendly as a wikirule and will have to move parser and do-away with the rule.
* custom content type?
Another thought was to use the TW5 tree to hold the language's tree as a wiki comment. Although I'm not afraid of more work, I thought I would confer with the group before I went down a resolution path.
Any recommendations?