{"action":"created","issue":{"url":"https://api.github.com/repos/mawww/kakoune/issues/1049","repository_url":"https://api.github.com/repos/mawww/kakoune","labels_url":"https://api.github.com/repos/mawww/kakoune/issues/1049/labels{/name}","comments_url":"https://api.github.com/repos/mawww/kakoune/issues/1049/comments","events_url":"https://api.github.com/repos/mawww/kakoune/issues/1049/events","html_url":"https://github.com/mawww/kakoune/issues/1049","id":196789682,"number":1049,"title":"\"foo\\\\\" produces incorrect parse error","user":{"login":"kballard","id":714,"avatar_url":"https://avatars.githubusercontent.com/u/714?v=3","gravatar_id":"","url":"https://api.github.com/users/kballard","html_url":"https://github.com/kballard","followers_url":"https://api.github.com/users/kballard/followers","following_url":"https://api.github.com/users/kballard/following{/other_user}","gists_url":"https://api.github.com/users/kballard/gists{/gist_id}","starred_url":"https://api.github.com/users/kballard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kballard/subscriptions","organizations_url":"https://api.github.com/users/kballard/orgs","repos_url":"https://api.github.com/users/kballard/repos","events_url":"https://api.github.com/users/kballard/events{/privacy}","received_events_url":"https://api.github.com/users/kballard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-20T21:47:56Z","updated_at":"2017-01-05T11:51:42Z","closed_at":null,"body":"If I terminate any double-quoted string with `\\\\`, Kakoune throws a parse error regarding an unterminated string, as if I had ended it with just `\\` (which would then escape the double quote).\r\n\r\nExample:\r\n\r\n```\r\necho \"foo\\\\x\" # works\r\necho \"foo\\\\\" # parse error\r\necho \"\\\\\" # parse error\r\n```\r\n\r\nSimilarly, putting `\\\\` before a `\"` escapes it just as putting merely `\\` does:\r\n\r\n```\r\necho \"foo\\\\\"bar\" # this works, but shouldn't\r\n```\r\n\r\nAs near as I can tell, it's parsing for the end of the string separately from how it parses escapes, and when it finds a `\"` it simply looks one character back to see if it's a `\\` and if so, treats the quote as escaped, even if that `\\` had itself been escaped."},"comment":{"url":"https://api.github.com/repos/mawww/kakoune/issues/comments/270627375","html_url":"https://github.com/mawww/kakoune/issues/1049#issuecomment-270627375","issue_url":"https://api.github.com/repos/mawww/kakoune/issues/1049","id":270627375,"user":{"login":"mawww","id":51221,"avatar_url":"https://avatars.githubusercontent.com/u/51221?v=3","gravatar_id":"","url":"https://api.github.com/users/mawww","html_url":"https://github.com/mawww","followers_url":"https://api.github.com/users/mawww/followers","following_url":"https://api.github.com/users/mawww/following{/other_user}","gists_url":"https://api.github.com/users/mawww/gists{/gist_id}","starred_url":"https://api.github.com/users/mawww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mawww/subscriptions","organizations_url":"https://api.github.com/users/mawww/orgs","repos_url":"https://api.github.com/users/mawww/repos","events_url":"https://api.github.com/users/mawww/events{/privacy}","received_events_url":"https://api.github.com/users/mawww/received_events","type":"User","site_admin":false},"created_at":"2017-01-05T11:51:42Z","updated_at":"2017-01-05T11:51:42Z","body":"Argh, I took a look, its pretty easy to fix, but it brings us into escaping hell, as `\\\\` now needs to be written `\\\\\\\\` in `\"...\"` and `'...'` strings. Thankfully we have % strings that do not support escaping at all."}}
{"actor":{"display_login":"mawww"}}