Brice Figureau schrieb:
> When the node/class (or any other block containing braces) is reduced we 
> know that we just closed a brace block. It is the perfect time to pop 
> the comment stack, and then associate the result with the AST node we're 
> building.
> It just requires to add some lexer.commentpop code to the grammar rules 
> for the blocks statements (ie node, class, resources...), or 
> modification of Parser.ast()

[without having looked at the code]

Couldn't the lexer collect the comments and add them to the _next_ 
token, instead of storing them on a stack? Having the information on the 
token should make it straightforward to process it in the grammar.


Regards, DavidS

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to