[Completion] Refactored the main incremental code parsing facility by enforcing DRY