handling literals in double quotes and single quotes