I don't think it would be hard to store the entire token stream that produced a tree, but it sounds like you want to somehow keep track of what tokens produced what node, which is more complicated and probably overkill. We chose not to store tokens in order to minimize memory.
What information is missing in the tree that you need? The presence of parens? If you need paren information in the tree, I would just add a field like hasParens to BinaryOperatorNode. Or add ParenthesizedExpressionNode. But why not just wrap parens around each binary operator expression when you emit JS? Is that what FalconJS does? - Gordon -----Original Message----- From: Michael Schmalle [mailto:[email protected]] Sent: Wednesday, March 06, 2013 7:43 AM To: [email protected] Subject: [Falcon] Token stream recording Hi, Gordon this is aimed at you. Do you see any way or know of any way to allow the parser or some type of strategy to record all tokens when parsing? Would you have any guidance on how to implement this if possible? Is there any way to plug into the current repairing token stream to save this out to a linked list like we talked about months ago? Mike -- Michael Schmalle - Teoti Graphix, LLC http://www.teotigraphix.com http://blog.teotigraphix.com
