Fixed logic for parsing literal tokens.