Hi Jeremy,

Parse rule is working (parse tiddler/haystack for needles) and completing 
with:
                return [{
                        type: "action-setfield",
                        tag: "$action-setfield",
                        params: params
                        attributes: {
                                field   : {type: "string", value: 
'needles'},
                                value   : {type: "string", value: 
needlesList}
                        },
                        children: parseResults.tree
                        }];

Not sure this rusty newb can create a custom widget, but expecting 
action-setfield to work.  (no joy) 

The widget should have no impact on the tiddler other than parsing for 
tiddler text and creating the "needles" field with list of the "needles".

Looking for recommendations.  Thank you!

On Friday, November 24, 2017 at 5:31:54 PM UTC-6 senechaux wrote:

> Hi Jeremy,
>
> Sorry I failed at the use-case description.  Imagine an interpreted 
> language where one or more *statements *can exist within a number of 
> tiddlers.  I want the parsing to occur only when the statement(s) are saved 
> in a tiddler -- leaving only the parse tree for later.  
>
> I will try the use of a widget as you suggest.  Assuming the *tiddler 
> field* is best to store the tree, is it possible to hide the field?
>
> Thank your for your interest!
>
>
> On Friday, November 24, 2017 at 3:12:43 PM UTC-6, senechaux wrote:
>>
>> 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?
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/e1e6050f-622f-4852-badf-01a1bb70e84cn%40googlegroups.com.

Reply via email to