Refactor LineAnalyser.emit
Add docstring to LineAnalyser.on_line