{"action":"created","issue":{"url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/4036","repository_url":"https://api.github.com/repos/idris-lang/Idris-dev","labels_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/4036/labels{/name}","comments_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/4036/comments","events_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/4036/events","html_url":"https://github.com/idris-lang/Idris-dev/pull/4036","id":254242326,"number":4036,"title":"Text.Lexer: positive and negative lookahead","user":{"login":"msmorgan","id":94825,"avatar_url":"https://avatars3.githubusercontent.com/u/94825?v=4","gravatar_id":"","url":"https://api.github.com/users/msmorgan","html_url":"https://github.com/msmorgan","followers_url":"https://api.github.com/users/msmorgan/followers","following_url":"https://api.github.com/users/msmorgan/following{/other_user}","gists_url":"https://api.github.com/users/msmorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/msmorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msmorgan/subscriptions","organizations_url":"https://api.github.com/users/msmorgan/orgs","repos_url":"https://api.github.com/users/msmorgan/repos","events_url":"https://api.github.com/users/msmorgan/events{/privacy}","received_events_url":"https://api.github.com/users/msmorgan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-31T07:32:57Z","updated_at":"2017-08-31T10:57:24Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/idris-lang/Idris-dev/pulls/4036","html_url":"https://github.com/idris-lang/Idris-dev/pull/4036","diff_url":"https://github.com/idris-lang/Idris-dev/pull/4036.diff","patch_url":"https://github.com/idris-lang/Idris-dev/pull/4036.patch"},"body":"This required a new constructor for `Recognise`, called `Look`.\r\n\r\nExports new functions `look` and `unlook`.\r\n"},"comment":{"url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/comments/326261774","html_url":"https://github.com/idris-lang/Idris-dev/pull/4036#issuecomment-326261774","issue_url":"https://api.github.com/repos/idris-lang/Idris-dev/issues/4036","id":326261774,"user":{"login":"msmorgan","id":94825,"avatar_url":"https://avatars3.githubusercontent.com/u/94825?v=4","gravatar_id":"","url":"https://api.github.com/users/msmorgan","html_url":"https://github.com/msmorgan","followers_url":"https://api.github.com/users/msmorgan/followers","following_url":"https://api.github.com/users/msmorgan/following{/other_user}","gists_url":"https://api.github.com/users/msmorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/msmorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msmorgan/subscriptions","organizations_url":"https://api.github.com/users/msmorgan/orgs","repos_url":"https://api.github.com/users/msmorgan/repos","events_url":"https://api.github.com/users/msmorgan/events{/privacy}","received_events_url":"https://api.github.com/users/msmorgan/received_events","type":"User","site_admin":false},"created_at":"2017-08-31T10:57:24Z","updated_at":"2017-08-31T10:57:24Z","author_association":"CONTRIBUTOR","body":"Upon further reflection, I wasn't happy with the names I'd originally chosen, so I renamed the new identifiers to `Expect`, `expect` and `reject`. I think these are nice to read.\r\n\r\n#### Usage examples\r\n```idris\r\n||| /[^A-Za-z]/\r\nnonAlpha : Lexer\r\nnonAlpha = reject alpha <+> any\r\n\r\n||| /\\\\(?=[\\r\\n])/\r\nnewlineEscape : Lexer\r\nnewlineEscape = is '\\\\' <+> expect (oneOf \"\\r\\n\")\r\n```\r\n\r\nI've also added a second commit defining `non`, generalizing the form of `nonAlpha` in the above examples. That way, you can simply write `non alpha`.\r\n"}}
{"actor":{"display_login":"msmorgan"}}