{"action":"created","comment":{"url":"https://api.github.com/repos/howl-editor/howl/pulls/comments/75770295","id":75770295,"diff_hunk":"@@ -0,0 +1,93 @@\n+--- rust lexer for howl from [ta-rust](https://bitbucket.org/a_baez/ta-rust)\n+-- See @{README.md} for details on usage.\n+-- @author [Alejandro Baez](https://keybase.io/baez)\n+-- @copyright 2016\n+-- @license MIT (see LICENSE)\n+-- @module rust\n+\n+howl.util.lpeg_lexer ->\n+  c = capture\n+  -- shorthand for lexer.word\n+  ident = (alpha + '_')^1 * (alpha + digit + '_')^0\n+\n+  -- Comments.\n+  line_comment = P'//' * scan_until eol\n+  block_comment = span '/*', '*/'\n+  comment = c 'comment', any {line_comment, block_comment}\n+\n+  -- Strings.\n+  dq_str = span '\"', '\"', '\\\\'\n+  raw_str = span '#\"', '#'\n+  string  = c 'string', any {dq_str, raw_str}\n+\n+\n+  -- Numbers.\n+  number = c 'number', any {\n+    float,\n+    hexadecimal,\n+    octal,\n+    '0b' * (R'01' + '_')^1,\n+    (digit + '_')^1 -- decimal integer\n+  }\n+\n+  -- Keywords.\n+  keyword = c 'keyword', word {\n+    'abstract',   'alignof',    'as',       'become',   'box',\n+    'break',      'const',      'continue', 'crate',    'do',\n+    'else',       'enum',       'extern',   'false',    'final',\n+    'fn',         'for',        'if',       'impl',     'in',\n+    'let',        'loop',       'macro',    'match',    'mod',\n+    'move',       'mut',        \"offsetof\", 'override', 'priv',\n+    'proc',       'pub',        'pure',     'ref',      'return',\n+    'Self',       'self',       'sizeof',   'static',   'struct',\n+    'super',      'trait',      'true',     'type',     'typeof',\n+    'unsafe',     'unsized',    'use',      'virtual',  'where',\n+    'while',      'yield'\n+  }\n+\n+  -- Library Types.\n+  library = upper^1 * (lower + digit)^1\n+\n+  -- Lifetimes.\n+  lifetime = \"'\" * ident\n+\n+  -- Primitive Types.\n+  primitive = word {\n+    'bool', 'isize', 'usize', 'char', 'str',\n+    'u8', 'u16', 'u32', 'u64', 'i8', 'i16', 'i32', 'i64',\n+    'f32','f64',\n+  }\n+\n+  type = c 'type', any {library, lifetime, primitive}\n+\n+  -- Identifiers.\n+  identifier = c 'identifier', ident\n+\n+  -- Operators.\n+  operator = c 'operator', S'+-/*%<>!=`^~@&|?#~:;,.()[]{}'\n+\n+  -- Attributes.\n+  attribute = c 'attribute', (P'#![' + P'#[') * scan_until(eol + P']')","path":"bundles/rust/rust_lexer.moon","position":70,"original_position":70,"commit_id":"58894ec8c5297f0f93f3ceb5f63ef70ea15e3334","original_commit_id":"58894ec8c5297f0f93f3ceb5f63ef70ea15e3334","user":{"login":"kirbyfan64","id":1690697,"avatar_url":"https://avatars.githubusercontent.com/u/1690697?v=3","gravatar_id":"","url":"https://api.github.com/users/kirbyfan64","html_url":"https://github.com/kirbyfan64","followers_url":"https://api.github.com/users/kirbyfan64/followers","following_url":"https://api.github.com/users/kirbyfan64/following{/other_user}","gists_url":"https://api.github.com/users/kirbyfan64/gists{/gist_id}","starred_url":"https://api.github.com/users/kirbyfan64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirbyfan64/subscriptions","organizations_url":"https://api.github.com/users/kirbyfan64/orgs","repos_url":"https://api.github.com/users/kirbyfan64/repos","events_url":"https://api.github.com/users/kirbyfan64/events{/privacy}","received_events_url":"https://api.github.com/users/kirbyfan64/received_events","type":"User","site_admin":false},"body":"This confuses me a little. For starters, it won't highlight the closing brace (I think using `scan_to` instead of `scan_until` will fix that). But...why is the `eol +` there? The `eol` will always match, so lpeg will never even bother to try the `P']'`. My guess is that you were trying to highlight it correctly, even if the attribute was still being typed; in that case, I think `P']' + eol` would work better.","created_at":"2016-08-22T22:22:33Z","updated_at":"2016-08-22T22:22:33Z","html_url":"https://github.com/howl-editor/howl/pull/257#discussion_r75770295","pull_request_url":"https://api.github.com/repos/howl-editor/howl/pulls/257","_links":{"self":{"href":"https://api.github.com/repos/howl-editor/howl/pulls/comments/75770295"},"html":{"href":"https://github.com/howl-editor/howl/pull/257#discussion_r75770295"},"pull_request":{"href":"https://api.github.com/repos/howl-editor/howl/pulls/257"}}},"pull_request":{"url":"https://api.github.com/repos/howl-editor/howl/pulls/257","id":82266125,"html_url":"https://github.com/howl-editor/howl/pull/257","diff_url":"https://github.com/howl-editor/howl/pull/257.diff","patch_url":"https://github.com/howl-editor/howl/pull/257.patch","issue_url":"https://api.github.com/repos/howl-editor/howl/issues/257","number":257,"state":"open","locked":false,"title":"Rust bundle patch introduction","user":{"login":"abaez","id":1403630,"avatar_url":"https://avatars.githubusercontent.com/u/1403630?v=3","gravatar_id":"","url":"https://api.github.com/users/abaez","html_url":"https://github.com/abaez","followers_url":"https://api.github.com/users/abaez/followers","following_url":"https://api.github.com/users/abaez/following{/other_user}","gists_url":"https://api.github.com/users/abaez/gists{/gist_id}","starred_url":"https://api.github.com/users/abaez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abaez/subscriptions","organizations_url":"https://api.github.com/users/abaez/orgs","repos_url":"https://api.github.com/users/abaez/repos","events_url":"https://api.github.com/users/abaez/events{/privacy}","received_events_url":"https://api.github.com/users/abaez/received_events","type":"User","site_admin":false},"body":"First patch starting from 'initial commit' 1d8df75 to 754a618 in\r\n[howl-rust].\r\n\r\nThese changesets introduce the [Rust] bundle into howl with full\r\nlexical definition. The changesets continue feature request #224 and\r\nalso allow the progress of the bundle, with easier integration into\r\nhowl, from the [howl-rust] source.\r\n\r\n[howl-rust]: https://bitbucket.org/a_baez/howl-rust\r\n[Rust]: https://www.rust-lang.org/en-US/","created_at":"2016-08-22T21:25:11Z","updated_at":"2016-08-22T22:22:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91703b9a28327f12959d22b97f02945a739654e0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/howl-editor/howl/pulls/257/commits","review_comments_url":"https://api.github.com/repos/howl-editor/howl/pulls/257/comments","review_comment_url":"https://api.github.com/repos/howl-editor/howl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/howl-editor/howl/issues/257/comments","statuses_url":"https://api.github.com/repos/howl-editor/howl/statuses/58894ec8c5297f0f93f3ceb5f63ef70ea15e3334","head":{"label":"abaez:rsp0","ref":"rsp0","sha":"58894ec8c5297f0f93f3ceb5f63ef70ea15e3334","user":{"login":"abaez","id":1403630,"avatar_url":"https://avatars.githubusercontent.com/u/1403630?v=3","gravatar_id":"","url":"https://api.github.com/users/abaez","html_url":"https://github.com/abaez","followers_url":"https://api.github.com/users/abaez/followers","following_url":"https://api.github.com/users/abaez/following{/other_user}","gists_url":"https://api.github.com/users/abaez/gists{/gist_id}","starred_url":"https://api.github.com/users/abaez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abaez/subscriptions","organizations_url":"https://api.github.com/users/abaez/orgs","repos_url":"https://api.github.com/users/abaez/repos","events_url":"https://api.github.com/users/abaez/events{/privacy}","received_events_url":"https://api.github.com/users/abaez/received_events","type":"User","site_admin":false},"repo":{"id":66309293,"name":"howl","full_name":"abaez/howl","owner":{"login":"abaez","id":1403630,"avatar_url":"https://avatars.githubusercontent.com/u/1403630?v=3","gravatar_id":"","url":"https://api.github.com/users/abaez","html_url":"https://github.com/abaez","followers_url":"https://api.github.com/users/abaez/followers","following_url":"https://api.github.com/users/abaez/following{/other_user}","gists_url":"https://api.github.com/users/abaez/gists{/gist_id}","starred_url":"https://api.github.com/users/abaez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abaez/subscriptions","organizations_url":"https://api.github.com/users/abaez/orgs","repos_url":"https://api.github.com/users/abaez/repos","events_url":"https://api.github.com/users/abaez/events{/privacy}","received_events_url":"https://api.github.com/users/abaez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abaez/howl","description":"The Howl Editor","fork":true,"url":"https://api.github.com/repos/abaez/howl","forks_url":"https://api.github.com/repos/abaez/howl/forks","keys_url":"https://api.github.com/repos/abaez/howl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abaez/howl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abaez/howl/teams","hooks_url":"https://api.github.com/repos/abaez/howl/hooks","issue_events_url":"https://api.github.com/repos/abaez/howl/issues/events{/number}","events_url":"https://api.github.com/repos/abaez/howl/events","assignees_url":"https://api.github.com/repos/abaez/howl/assignees{/user}","branches_url":"https://api.github.com/repos/abaez/howl/branches{/branch}","tags_url":"https://api.github.com/repos/abaez/howl/tags","blobs_url":"https://api.github.com/repos/abaez/howl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abaez/howl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abaez/howl/git/refs{/sha}","trees_url":"https://api.github.com/repos/abaez/howl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abaez/howl/statuses/{sha}","languages_url":"https://api.github.com/repos/abaez/howl/languages","stargazers_url":"https://api.github.com/repos/abaez/howl/stargazers","contributors_url":"https://api.github.com/repos/abaez/howl/contributors","subscribers_url":"https://api.github.com/repos/abaez/howl/subscribers","subscription_url":"https://api.github.com/repos/abaez/howl/subscription","commits_url":"https://api.github.com/repos/abaez/howl/commits{/sha}","git_commits_url":"https://api.github.com/repos/abaez/howl/git/commits{/sha}","comments_url":"https://api.github.com/repos/abaez/howl/comments{/number}","issue_comment_url":"https://api.github.com/repos/abaez/howl/issues/comments{/number}","contents_url":"https://api.github.com/repos/abaez/howl/contents/{+path}","compare_url":"https://api.github.com/repos/abaez/howl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abaez/howl/merges","archive_url":"https://api.github.com/repos/abaez/howl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abaez/howl/downloads","issues_url":"https://api.github.com/repos/abaez/howl/issues{/number}","pulls_url":"https://api.github.com/repos/abaez/howl/pulls{/number}","milestones_url":"https://api.github.com/repos/abaez/howl/milestones{/number}","notifications_url":"https://api.github.com/repos/abaez/howl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abaez/howl/labels{/name}","releases_url":"https://api.github.com/repos/abaez/howl/releases{/id}","deployments_url":"https://api.github.com/repos/abaez/howl/deployments","created_at":"2016-08-22T21:24:04Z","updated_at":"2016-08-22T21:24:06Z","pushed_at":"2016-08-22T21:40:21Z","git_url":"git://github.com/abaez/howl.git","ssh_url":"git@github.com:abaez/howl.git","clone_url":"https://github.com/abaez/howl.git","svn_url":"https://github.com/abaez/howl","homepage":"http://howl.io","size":26871,"stargazers_count":0,"watchers_count":0,"language":"MoonScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"howl-editor:master","ref":"master","sha":"fb362aa520b408f6b916d1002fa53f3cc3f1fb7e","user":{"login":"howl-editor","id":7137358,"avatar_url":"https://avatars.githubusercontent.com/u/7137358?v=3","gravatar_id":"","url":"https://api.github.com/users/howl-editor","html_url":"https://github.com/howl-editor","followers_url":"https://api.github.com/users/howl-editor/followers","following_url":"https://api.github.com/users/howl-editor/following{/other_user}","gists_url":"https://api.github.com/users/howl-editor/gists{/gist_id}","starred_url":"https://api.github.com/users/howl-editor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howl-editor/subscriptions","organizations_url":"https://api.github.com/users/howl-editor/orgs","repos_url":"https://api.github.com/users/howl-editor/repos","events_url":"https://api.github.com/users/howl-editor/events{/privacy}","received_events_url":"https://api.github.com/users/howl-editor/received_events","type":"Organization","site_admin":false},"repo":{"id":14235156,"name":"howl","full_name":"howl-editor/howl","owner":{"login":"howl-editor","id":7137358,"avatar_url":"https://avatars.githubusercontent.com/u/7137358?v=3","gravatar_id":"","url":"https://api.github.com/users/howl-editor","html_url":"https://github.com/howl-editor","followers_url":"https://api.github.com/users/howl-editor/followers","following_url":"https://api.github.com/users/howl-editor/following{/other_user}","gists_url":"https://api.github.com/users/howl-editor/gists{/gist_id}","starred_url":"https://api.github.com/users/howl-editor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howl-editor/subscriptions","organizations_url":"https://api.github.com/users/howl-editor/orgs","repos_url":"https://api.github.com/users/howl-editor/repos","events_url":"https://api.github.com/users/howl-editor/events{/privacy}","received_events_url":"https://api.github.com/users/howl-editor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/howl-editor/howl","description":"The Howl Editor","fork":false,"url":"https://api.github.com/repos/howl-editor/howl","forks_url":"https://api.github.com/repos/howl-editor/howl/forks","keys_url":"https://api.github.com/repos/howl-editor/howl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/howl-editor/howl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/howl-editor/howl/teams","hooks_url":"https://api.github.com/repos/howl-editor/howl/hooks","issue_events_url":"https://api.github.com/repos/howl-editor/howl/issues/events{/number}","events_url":"https://api.github.com/repos/howl-editor/howl/events","assignees_url":"https://api.github.com/repos/howl-editor/howl/assignees{/user}","branches_url":"https://api.github.com/repos/howl-editor/howl/branches{/branch}","tags_url":"https://api.github.com/repos/howl-editor/howl/tags","blobs_url":"https://api.github.com/repos/howl-editor/howl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/howl-editor/howl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/howl-editor/howl/git/refs{/sha}","trees_url":"https://api.github.com/repos/howl-editor/howl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/howl-editor/howl/statuses/{sha}","languages_url":"https://api.github.com/repos/howl-editor/howl/languages","stargazers_url":"https://api.github.com/repos/howl-editor/howl/stargazers","contributors_url":"https://api.github.com/repos/howl-editor/howl/contributors","subscribers_url":"https://api.github.com/repos/howl-editor/howl/subscribers","subscription_url":"https://api.github.com/repos/howl-editor/howl/subscription","commits_url":"https://api.github.com/repos/howl-editor/howl/commits{/sha}","git_commits_url":"https://api.github.com/repos/howl-editor/howl/git/commits{/sha}","comments_url":"https://api.github.com/repos/howl-editor/howl/comments{/number}","issue_comment_url":"https://api.github.com/repos/howl-editor/howl/issues/comments{/number}","contents_url":"https://api.github.com/repos/howl-editor/howl/contents/{+path}","compare_url":"https://api.github.com/repos/howl-editor/howl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/howl-editor/howl/merges","archive_url":"https://api.github.com/repos/howl-editor/howl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/howl-editor/howl/downloads","issues_url":"https://api.github.com/repos/howl-editor/howl/issues{/number}","pulls_url":"https://api.github.com/repos/howl-editor/howl/pulls{/number}","milestones_url":"https://api.github.com/repos/howl-editor/howl/milestones{/number}","notifications_url":"https://api.github.com/repos/howl-editor/howl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/howl-editor/howl/labels{/name}","releases_url":"https://api.github.com/repos/howl-editor/howl/releases{/id}","deployments_url":"https://api.github.com/repos/howl-editor/howl/deployments","created_at":"2013-11-08T14:38:11Z","updated_at":"2016-08-22T16:03:19Z","pushed_at":"2016-08-22T21:40:22Z","git_url":"git://github.com/howl-editor/howl.git","ssh_url":"git@github.com:howl-editor/howl.git","clone_url":"https://github.com/howl-editor/howl.git","svn_url":"https://github.com/howl-editor/howl","homepage":"http://howl.io","size":26871,"stargazers_count":172,"watchers_count":172,"language":"MoonScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":27,"forks":24,"open_issues":27,"watchers":172,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/howl-editor/howl/pulls/257"},"html":{"href":"https://github.com/howl-editor/howl/pull/257"},"issue":{"href":"https://api.github.com/repos/howl-editor/howl/issues/257"},"comments":{"href":"https://api.github.com/repos/howl-editor/howl/issues/257/comments"},"review_comments":{"href":"https://api.github.com/repos/howl-editor/howl/pulls/257/comments"},"review_comment":{"href":"https://api.github.com/repos/howl-editor/howl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/howl-editor/howl/pulls/257/commits"},"statuses":{"href":"https://api.github.com/repos/howl-editor/howl/statuses/58894ec8c5297f0f93f3ceb5f63ef70ea15e3334"}}}}
{"actor":{"display_login":"kirbyfan64"}}