rusty-ecma/RESSA

Allow for user defined Comment Handler

FreeMasen opened this issue · 1 comments

use ress::Item;
pub trait CommentHandler {
    fn handle_comment(self, comment: Item);
}

This trait would define a property on the Parser, if this was provided by the user, any comments that are returned from the Scanner would be sent to the handle_comment fn. This would allow for users to care about what comments might mean.

addressed by #9