Terminating on unclosed comments and unclosed closed double quotes