def is_quote(code, idx=0):
    """Position in string is an unescaped quotation mark."""
    return (0 <= idx < len(code) and
            code[idx] == '"' and
            (idx == 0 or code[idx-1] != '\\'))