Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Parser
-
Labels:None
-
Environment:Gentoo Linux / Windows Vista
Description
As announced on the mailing list, here is the patch which includes the postprocessing of the parser result. This contains a new interface PostProcessor which must be implemented by every post processor. The ParserConfiguration gets new methods to add and get such post processors. The ParserSupport has a new method to apply every post processor to the ParserResult.
As an example what a post processor could do there is the implementation of the commen node placing in the ast. (Mirko is about to implement the testing possibilities for the comment stuff.)
This is contained in the postprocessing.patch file.
The only thing which is not done yet is the call of the applyPostProcessors method of the ParserSupport. I didn't want to decide if it should be called at the end of the parse()-method of the DefaultRubyParser before returning the ParserResult or if it should be done by the user of the parser itself manually. My suggestion would be to do it in the Parser as the post processors could still be left out when none is added to the configuration. This is contained in the DefaultRubyParser.patch file.
This is going to need revisiting and refreshing if there's still something worth adding here...