Extract BatchProcessor from BatchParser.
Let the BatchParser only deal with the actual parsing part. A separate BatchProcessor then deals with combining the parsed source files into classes and doing all kinds of additional processing on them. The top-level JsDuck::App is now also simpler as it just saves the @parsed_files and @relations into separate instance variables, and can easily use them later without needing to ask list of parsed files from BatchProcessor instance. Both BatchParser and BatchProcessor are now singleton classes keeping no state inside them - so they're also simpler to reason about.
Loading
Please register or sign in to comment