[Backport] Backport changes to the ScalaCodeScanner tokenizer