{"action":"created","comment":{"url":"https://api.github.com/repos/cdglabs/ohm/pulls/comments/54548635","id":54548635,"diff_hunk":"@@ -33,6 +35,14 @@ PExpr.prototype.withInterval = function(interval) {\n   return this;\n };\n \n+// Record the start and end index of the source for this expression, relative to an implicit\n+// source string. Similar to `withInterval`, but can be used when it's not possible to pass\n+// an Interval instance (e.g., inside a recipe).\n+PExpr.prototype.fromSourceAt = function(startIdx, endIdx) {","path":"src/pexprs.js","position":23,"original_position":23,"commit_id":"a9e530babfc8b12a41ed48275732d7a16e5f82ec","original_commit_id":"a9e530babfc8b12a41ed48275732d7a16e5f82ec","user":{"login":"pdubroy","id":17293,"avatar_url":"https://avatars.githubusercontent.com/u/17293?v=3","gravatar_id":"","url":"https://api.github.com/users/pdubroy","html_url":"https://github.com/pdubroy","followers_url":"https://api.github.com/users/pdubroy/followers","following_url":"https://api.github.com/users/pdubroy/following{/other_user}","gists_url":"https://api.github.com/users/pdubroy/gists{/gist_id}","starred_url":"https://api.github.com/users/pdubroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdubroy/subscriptions","organizations_url":"https://api.github.com/users/pdubroy/orgs","repos_url":"https://api.github.com/users/pdubroy/repos","events_url":"https://api.github.com/users/pdubroy/events{/privacy}","received_events_url":"https://api.github.com/users/pdubroy/received_events","type":"User","site_admin":false},"body":"Ah, good catch. This was left over from my initial implementation, which I wasn't happy with. Fixed.","created_at":"2016-03-01T10:33:17Z","updated_at":"2016-03-01T10:33:17Z","html_url":"https://github.com/cdglabs/ohm/pull/69#discussion_r54548635","pull_request_url":"https://api.github.com/repos/cdglabs/ohm/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/cdglabs/ohm/pulls/comments/54548635"},"html":{"href":"https://github.com/cdglabs/ohm/pull/69#discussion_r54548635"},"pull_request":{"href":"https://api.github.com/repos/cdglabs/ohm/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/cdglabs/ohm/pulls/69","id":60544979,"html_url":"https://github.com/cdglabs/ohm/pull/69","diff_url":"https://github.com/cdglabs/ohm/pull/69.diff","patch_url":"https://github.com/cdglabs/ohm/pull/69.patch","issue_url":"https://api.github.com/repos/cdglabs/ohm/issues/69","number":69,"state":"open","locked":false,"title":"Include grammar source in recipes if possible.","user":{"login":"pdubroy","id":17293,"avatar_url":"https://avatars.githubusercontent.com/u/17293?v=3","gravatar_id":"","url":"https://api.github.com/users/pdubroy","html_url":"https://github.com/pdubroy","followers_url":"https://api.github.com/users/pdubroy/followers","following_url":"https://api.github.com/users/pdubroy/following{/other_user}","gists_url":"https://api.github.com/users/pdubroy/gists{/gist_id}","starred_url":"https://api.github.com/users/pdubroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdubroy/subscriptions","organizations_url":"https://api.github.com/users/pdubroy/orgs","repos_url":"https://api.github.com/users/pdubroy/repos","events_url":"https://api.github.com/users/pdubroy/events{/privacy}","received_events_url":"https://api.github.com/users/pdubroy/received_events","type":"User","site_admin":false},"body":"@mroeder and @alexwarth -- please take a look. This commit ensures that the grammar source is retained even when the grammar comes from a recipe. The impetus for this is to be able to show the definition for built-in rules inside the editor. I'm currently relying on `PExpr.prototype.toString()`, which gives a poor user experience.","created_at":"2016-02-24T17:19:36Z","updated_at":"2016-03-01T10:33:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d0f6ea4d8e0e47f39cc59d73eae4b9adb91486b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cdglabs/ohm/pulls/69/commits","review_comments_url":"https://api.github.com/repos/cdglabs/ohm/pulls/69/comments","review_comment_url":"https://api.github.com/repos/cdglabs/ohm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cdglabs/ohm/issues/69/comments","statuses_url":"https://api.github.com/repos/cdglabs/ohm/statuses/a9e530babfc8b12a41ed48275732d7a16e5f82ec","head":{"label":"cdglabs:source-in-recipes","ref":"source-in-recipes","sha":"a9e530babfc8b12a41ed48275732d7a16e5f82ec","user":{"login":"cdglabs","id":9912100,"avatar_url":"https://avatars.githubusercontent.com/u/9912100?v=3","gravatar_id":"","url":"https://api.github.com/users/cdglabs","html_url":"https://github.com/cdglabs","followers_url":"https://api.github.com/users/cdglabs/followers","following_url":"https://api.github.com/users/cdglabs/following{/other_user}","gists_url":"https://api.github.com/users/cdglabs/gists{/gist_id}","starred_url":"https://api.github.com/users/cdglabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdglabs/subscriptions","organizations_url":"https://api.github.com/users/cdglabs/orgs","repos_url":"https://api.github.com/users/cdglabs/repos","events_url":"https://api.github.com/users/cdglabs/events{/privacy}","received_events_url":"https://api.github.com/users/cdglabs/received_events","type":"Organization","site_admin":false},"repo":{"id":36021747,"name":"ohm","full_name":"cdglabs/ohm","owner":{"login":"cdglabs","id":9912100,"avatar_url":"https://avatars.githubusercontent.com/u/9912100?v=3","gravatar_id":"","url":"https://api.github.com/users/cdglabs","html_url":"https://github.com/cdglabs","followers_url":"https://api.github.com/users/cdglabs/followers","following_url":"https://api.github.com/users/cdglabs/following{/other_user}","gists_url":"https://api.github.com/users/cdglabs/gists{/gist_id}","starred_url":"https://api.github.com/users/cdglabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdglabs/subscriptions","organizations_url":"https://api.github.com/users/cdglabs/orgs","repos_url":"https://api.github.com/users/cdglabs/repos","events_url":"https://api.github.com/users/cdglabs/events{/privacy}","received_events_url":"https://api.github.com/users/cdglabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cdglabs/ohm","description":"A library and language for parsing and pattern matching.","fork":false,"url":"https://api.github.com/repos/cdglabs/ohm","forks_url":"https://api.github.com/repos/cdglabs/ohm/forks","keys_url":"https://api.github.com/repos/cdglabs/ohm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cdglabs/ohm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cdglabs/ohm/teams","hooks_url":"https://api.github.com/repos/cdglabs/ohm/hooks","issue_events_url":"https://api.github.com/repos/cdglabs/ohm/issues/events{/number}","events_url":"https://api.github.com/repos/cdglabs/ohm/events","assignees_url":"https://api.github.com/repos/cdglabs/ohm/assignees{/user}","branches_url":"https://api.github.com/repos/cdglabs/ohm/branches{/branch}","tags_url":"https://api.github.com/repos/cdglabs/ohm/tags","blobs_url":"https://api.github.com/repos/cdglabs/ohm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cdglabs/ohm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cdglabs/ohm/git/refs{/sha}","trees_url":"https://api.github.com/repos/cdglabs/ohm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cdglabs/ohm/statuses/{sha}","languages_url":"https://api.github.com/repos/cdglabs/ohm/languages","stargazers_url":"https://api.github.com/repos/cdglabs/ohm/stargazers","contributors_url":"https://api.github.com/repos/cdglabs/ohm/contributors","subscribers_url":"https://api.github.com/repos/cdglabs/ohm/subscribers","subscription_url":"https://api.github.com/repos/cdglabs/ohm/subscription","commits_url":"https://api.github.com/repos/cdglabs/ohm/commits{/sha}","git_commits_url":"https://api.github.com/repos/cdglabs/ohm/git/commits{/sha}","comments_url":"https://api.github.com/repos/cdglabs/ohm/comments{/number}","issue_comment_url":"https://api.github.com/repos/cdglabs/ohm/issues/comments{/number}","contents_url":"https://api.github.com/repos/cdglabs/ohm/contents/{+path}","compare_url":"https://api.github.com/repos/cdglabs/ohm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cdglabs/ohm/merges","archive_url":"https://api.github.com/repos/cdglabs/ohm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cdglabs/ohm/downloads","issues_url":"https://api.github.com/repos/cdglabs/ohm/issues{/number}","pulls_url":"https://api.github.com/repos/cdglabs/ohm/pulls{/number}","milestones_url":"https://api.github.com/repos/cdglabs/ohm/milestones{/number}","notifications_url":"https://api.github.com/repos/cdglabs/ohm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cdglabs/ohm/labels{/name}","releases_url":"https://api.github.com/repos/cdglabs/ohm/releases{/id}","deployments_url":"https://api.github.com/repos/cdglabs/ohm/deployments","created_at":"2015-05-21T15:42:14Z","updated_at":"2016-03-01T02:16:34Z","pushed_at":"2016-02-27T23:55:18Z","git_url":"git://github.com/cdglabs/ohm.git","ssh_url":"git@github.com:cdglabs/ohm.git","clone_url":"https://github.com/cdglabs/ohm.git","svn_url":"https://github.com/cdglabs/ohm","homepage":"","size":13635,"stargazers_count":307,"watchers_count":307,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":18,"forks":14,"open_issues":18,"watchers":307,"default_branch":"master"}},"base":{"label":"cdglabs:master","ref":"master","sha":"753f829ddbf2e36b9f85a3839b78e6ce77af60fd","user":{"login":"cdglabs","id":9912100,"avatar_url":"https://avatars.githubusercontent.com/u/9912100?v=3","gravatar_id":"","url":"https://api.github.com/users/cdglabs","html_url":"https://github.com/cdglabs","followers_url":"https://api.github.com/users/cdglabs/followers","following_url":"https://api.github.com/users/cdglabs/following{/other_user}","gists_url":"https://api.github.com/users/cdglabs/gists{/gist_id}","starred_url":"https://api.github.com/users/cdglabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdglabs/subscriptions","organizations_url":"https://api.github.com/users/cdglabs/orgs","repos_url":"https://api.github.com/users/cdglabs/repos","events_url":"https://api.github.com/users/cdglabs/events{/privacy}","received_events_url":"https://api.github.com/users/cdglabs/received_events","type":"Organization","site_admin":false},"repo":{"id":36021747,"name":"ohm","full_name":"cdglabs/ohm","owner":{"login":"cdglabs","id":9912100,"avatar_url":"https://avatars.githubusercontent.com/u/9912100?v=3","gravatar_id":"","url":"https://api.github.com/users/cdglabs","html_url":"https://github.com/cdglabs","followers_url":"https://api.github.com/users/cdglabs/followers","following_url":"https://api.github.com/users/cdglabs/following{/other_user}","gists_url":"https://api.github.com/users/cdglabs/gists{/gist_id}","starred_url":"https://api.github.com/users/cdglabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdglabs/subscriptions","organizations_url":"https://api.github.com/users/cdglabs/orgs","repos_url":"https://api.github.com/users/cdglabs/repos","events_url":"https://api.github.com/users/cdglabs/events{/privacy}","received_events_url":"https://api.github.com/users/cdglabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cdglabs/ohm","description":"A library and language for parsing and pattern matching.","fork":false,"url":"https://api.github.com/repos/cdglabs/ohm","forks_url":"https://api.github.com/repos/cdglabs/ohm/forks","keys_url":"https://api.github.com/repos/cdglabs/ohm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cdglabs/ohm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cdglabs/ohm/teams","hooks_url":"https://api.github.com/repos/cdglabs/ohm/hooks","issue_events_url":"https://api.github.com/repos/cdglabs/ohm/issues/events{/number}","events_url":"https://api.github.com/repos/cdglabs/ohm/events","assignees_url":"https://api.github.com/repos/cdglabs/ohm/assignees{/user}","branches_url":"https://api.github.com/repos/cdglabs/ohm/branches{/branch}","tags_url":"https://api.github.com/repos/cdglabs/ohm/tags","blobs_url":"https://api.github.com/repos/cdglabs/ohm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cdglabs/ohm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cdglabs/ohm/git/refs{/sha}","trees_url":"https://api.github.com/repos/cdglabs/ohm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cdglabs/ohm/statuses/{sha}","languages_url":"https://api.github.com/repos/cdglabs/ohm/languages","stargazers_url":"https://api.github.com/repos/cdglabs/ohm/stargazers","contributors_url":"https://api.github.com/repos/cdglabs/ohm/contributors","subscribers_url":"https://api.github.com/repos/cdglabs/ohm/subscribers","subscription_url":"https://api.github.com/repos/cdglabs/ohm/subscription","commits_url":"https://api.github.com/repos/cdglabs/ohm/commits{/sha}","git_commits_url":"https://api.github.com/repos/cdglabs/ohm/git/commits{/sha}","comments_url":"https://api.github.com/repos/cdglabs/ohm/comments{/number}","issue_comment_url":"https://api.github.com/repos/cdglabs/ohm/issues/comments{/number}","contents_url":"https://api.github.com/repos/cdglabs/ohm/contents/{+path}","compare_url":"https://api.github.com/repos/cdglabs/ohm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cdglabs/ohm/merges","archive_url":"https://api.github.com/repos/cdglabs/ohm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cdglabs/ohm/downloads","issues_url":"https://api.github.com/repos/cdglabs/ohm/issues{/number}","pulls_url":"https://api.github.com/repos/cdglabs/ohm/pulls{/number}","milestones_url":"https://api.github.com/repos/cdglabs/ohm/milestones{/number}","notifications_url":"https://api.github.com/repos/cdglabs/ohm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cdglabs/ohm/labels{/name}","releases_url":"https://api.github.com/repos/cdglabs/ohm/releases{/id}","deployments_url":"https://api.github.com/repos/cdglabs/ohm/deployments","created_at":"2015-05-21T15:42:14Z","updated_at":"2016-03-01T02:16:34Z","pushed_at":"2016-02-27T23:55:18Z","git_url":"git://github.com/cdglabs/ohm.git","ssh_url":"git@github.com:cdglabs/ohm.git","clone_url":"https://github.com/cdglabs/ohm.git","svn_url":"https://github.com/cdglabs/ohm","homepage":"","size":13635,"stargazers_count":307,"watchers_count":307,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":18,"forks":14,"open_issues":18,"watchers":307,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cdglabs/ohm/pulls/69"},"html":{"href":"https://github.com/cdglabs/ohm/pull/69"},"issue":{"href":"https://api.github.com/repos/cdglabs/ohm/issues/69"},"comments":{"href":"https://api.github.com/repos/cdglabs/ohm/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/cdglabs/ohm/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/cdglabs/ohm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cdglabs/ohm/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/cdglabs/ohm/statuses/a9e530babfc8b12a41ed48275732d7a16e5f82ec"}}}}