Create SourceFileParser class.
The parsing logic is now encapsulated inside this separate class, keeping the SourceFile class simpler and more to the point. The SourceFileParser is a singleton, so we no more create new merger, doc-parser, etc for every single file we parse. Also moved error handling out of SourceFile class up to App. This way the catching of parse errors no more interferes with unit tests.
Loading
Please sign in to comment