use of "IfNode"

May 11, 2010 at 9:01 PM

Roman and all,

I am looking for an example which generate the AST's IfNode properly. I have created a rule of if statement. Rulewise, it works. But the AST for IfNode is not populated correctly. The boolean expression should be at the "test" node, ends up at the "IfTrue" node; and the statement block for true case ends up at the "IfFalse" node. Thanks

dc    

 

 

Coordinator
May 13, 2010 at 6:51 AM

I suspect nodes are eliminated because you marked some of them as punctuation. Keep in mind that If node was basically carved for Scheme, implementation in other languages may need tweaking.

If none of this applies, then please provide more details - please post your grammar, how you setup your node

Roman

May 14, 2010 at 3:35 AM
Edited May 14, 2010 at 5:18 AM

Roman,

Thanks, looks like I need to tweak the punctuation first. 

dc