Refactoring simplify firstLiteral parsing logic.