{"action":"created","comment":{"url":"https://api.github.com/repos/rust-web/twig/pulls/comments/46771224","id":46771224,"diff_hunk":"@@ -0,0 +1,36 @@\n+// This file is part of rust-web/twig\n+//\n+// For the copyright and license information, please view the LICENSE\n+// file that was distributed with this source code.\n+\n+//! Position within a raw template.\n+\n+use std::fmt;\n+use template;\n+use error::Dump;\n+\n+pub type Position = usize;\n+pub type Line = usize;\n+pub type CursorDump = String;","path":"src/engine/parser/lexer/job/cursor.rs","position":14,"original_position":14,"commit_id":"9d9d78adae8984be3ccee750f50dce465e83ac7f","original_commit_id":"9d9d78adae8984be3ccee750f50dce465e83ac7f","user":{"login":"Nercury","id":106180,"avatar_url":"https://avatars.githubusercontent.com/u/106180?v=3","gravatar_id":"","url":"https://api.github.com/users/Nercury","html_url":"https://github.com/Nercury","followers_url":"https://api.github.com/users/Nercury/followers","following_url":"https://api.github.com/users/Nercury/following{/other_user}","gists_url":"https://api.github.com/users/Nercury/gists{/gist_id}","starred_url":"https://api.github.com/users/Nercury/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nercury/subscriptions","organizations_url":"https://api.github.com/users/Nercury/orgs","repos_url":"https://api.github.com/users/Nercury/repos","events_url":"https://api.github.com/users/Nercury/events{/privacy}","received_events_url":"https://api.github.com/users/Nercury/received_events","type":"User","site_admin":false},"body":"Unstructured data :/","created_at":"2015-12-06T14:50:45Z","updated_at":"2015-12-06T14:50:45Z","html_url":"https://github.com/rust-web/twig/pull/12#discussion_r46771224","pull_request_url":"https://api.github.com/repos/rust-web/twig/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/rust-web/twig/pulls/comments/46771224"},"html":{"href":"https://github.com/rust-web/twig/pull/12#discussion_r46771224"},"pull_request":{"href":"https://api.github.com/repos/rust-web/twig/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/rust-web/twig/pulls/12","id":52295449,"html_url":"https://github.com/rust-web/twig/pull/12","diff_url":"https://github.com/rust-web/twig/pull/12.diff","patch_url":"https://github.com/rust-web/twig/pull/12.patch","issue_url":"https://api.github.com/repos/rust-web/twig/issues/12","number":12,"state":"open","locked":false,"title":"twig engine skeleton - part II","user":{"login":"colin-kiegel","id":7691186,"avatar_url":"https://avatars.githubusercontent.com/u/7691186?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-kiegel","html_url":"https://github.com/colin-kiegel","followers_url":"https://api.github.com/users/colin-kiegel/followers","following_url":"https://api.github.com/users/colin-kiegel/following{/other_user}","gists_url":"https://api.github.com/users/colin-kiegel/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-kiegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-kiegel/subscriptions","organizations_url":"https://api.github.com/users/colin-kiegel/orgs","repos_url":"https://api.github.com/users/colin-kiegel/repos","events_url":"https://api.github.com/users/colin-kiegel/events{/privacy}","received_events_url":"https://api.github.com/users/colin-kiegel/received_events","type":"User","site_admin":false},"body":"Here is some skeleton code - as a suggestion.\r\n\r\nI stripped out my parser, lexer, loader and runtime implementations and I refactured what's left according to our previous discussion #10.\r\n\r\n* The facade is currently called `Engine`\r\n* The `Environment` is currently called `Setup`\r\n* The unicorn module is currently called `engine`\r\n\r\nSo what's left is the initialization logic of Engine - i.e. this works:\r\n```\r\nuse twig::{Engine, Setup};\r\nlet twig = Engine::new(Setup::default()).unwrap();\r\n// ..\r\n``` \r\n\r\nAnd this works too (although extension::Debug is only a dummy):\r\n```\r\nuse twig::{Setup, Engine};\r\nuse twig::extension::Debug;\r\n\r\nlet mut setup = Setup::default()\r\n     .set_strict_variables(true)\r\n     .add_extension(Debug::new()).unwrap();\r\nlet engine = Engine::new(setup).unwrap();\r\n```\r\n\r\nAnd it contains some error-code definitions.","created_at":"2015-12-01T18:22:05Z","updated_at":"2015-12-06T14:50:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1cd4d8c7ec71eee1710886b68936aa3a32ad62b0","assignee":{"login":"Nercury","id":106180,"avatar_url":"https://avatars.githubusercontent.com/u/106180?v=3","gravatar_id":"","url":"https://api.github.com/users/Nercury","html_url":"https://github.com/Nercury","followers_url":"https://api.github.com/users/Nercury/followers","following_url":"https://api.github.com/users/Nercury/following{/other_user}","gists_url":"https://api.github.com/users/Nercury/gists{/gist_id}","starred_url":"https://api.github.com/users/Nercury/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nercury/subscriptions","organizations_url":"https://api.github.com/users/Nercury/orgs","repos_url":"https://api.github.com/users/Nercury/repos","events_url":"https://api.github.com/users/Nercury/events{/privacy}","received_events_url":"https://api.github.com/users/Nercury/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-web/twig/pulls/12/commits","review_comments_url":"https://api.github.com/repos/rust-web/twig/pulls/12/comments","review_comment_url":"https://api.github.com/repos/rust-web/twig/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-web/twig/issues/12/comments","statuses_url":"https://api.github.com/repos/rust-web/twig/statuses/9d9d78adae8984be3ccee750f50dce465e83ac7f","head":{"label":"colin-kiegel:pr_twig_skeleton","ref":"pr_twig_skeleton","sha":"9d9d78adae8984be3ccee750f50dce465e83ac7f","user":{"login":"colin-kiegel","id":7691186,"avatar_url":"https://avatars.githubusercontent.com/u/7691186?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-kiegel","html_url":"https://github.com/colin-kiegel","followers_url":"https://api.github.com/users/colin-kiegel/followers","following_url":"https://api.github.com/users/colin-kiegel/following{/other_user}","gists_url":"https://api.github.com/users/colin-kiegel/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-kiegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-kiegel/subscriptions","organizations_url":"https://api.github.com/users/colin-kiegel/orgs","repos_url":"https://api.github.com/users/colin-kiegel/repos","events_url":"https://api.github.com/users/colin-kiegel/events{/privacy}","received_events_url":"https://api.github.com/users/colin-kiegel/received_events","type":"User","site_admin":false},"repo":{"id":46747787,"name":"twig","full_name":"colin-kiegel/twig","owner":{"login":"colin-kiegel","id":7691186,"avatar_url":"https://avatars.githubusercontent.com/u/7691186?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-kiegel","html_url":"https://github.com/colin-kiegel","followers_url":"https://api.github.com/users/colin-kiegel/followers","following_url":"https://api.github.com/users/colin-kiegel/following{/other_user}","gists_url":"https://api.github.com/users/colin-kiegel/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-kiegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-kiegel/subscriptions","organizations_url":"https://api.github.com/users/colin-kiegel/orgs","repos_url":"https://api.github.com/users/colin-kiegel/repos","events_url":"https://api.github.com/users/colin-kiegel/events{/privacy}","received_events_url":"https://api.github.com/users/colin-kiegel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/colin-kiegel/twig","description":"Twig templating engine for Rust; work in progress.","fork":true,"url":"https://api.github.com/repos/colin-kiegel/twig","forks_url":"https://api.github.com/repos/colin-kiegel/twig/forks","keys_url":"https://api.github.com/repos/colin-kiegel/twig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/colin-kiegel/twig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/colin-kiegel/twig/teams","hooks_url":"https://api.github.com/repos/colin-kiegel/twig/hooks","issue_events_url":"https://api.github.com/repos/colin-kiegel/twig/issues/events{/number}","events_url":"https://api.github.com/repos/colin-kiegel/twig/events","assignees_url":"https://api.github.com/repos/colin-kiegel/twig/assignees{/user}","branches_url":"https://api.github.com/repos/colin-kiegel/twig/branches{/branch}","tags_url":"https://api.github.com/repos/colin-kiegel/twig/tags","blobs_url":"https://api.github.com/repos/colin-kiegel/twig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/colin-kiegel/twig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/colin-kiegel/twig/git/refs{/sha}","trees_url":"https://api.github.com/repos/colin-kiegel/twig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/colin-kiegel/twig/statuses/{sha}","languages_url":"https://api.github.com/repos/colin-kiegel/twig/languages","stargazers_url":"https://api.github.com/repos/colin-kiegel/twig/stargazers","contributors_url":"https://api.github.com/repos/colin-kiegel/twig/contributors","subscribers_url":"https://api.github.com/repos/colin-kiegel/twig/subscribers","subscription_url":"https://api.github.com/repos/colin-kiegel/twig/subscription","commits_url":"https://api.github.com/repos/colin-kiegel/twig/commits{/sha}","git_commits_url":"https://api.github.com/repos/colin-kiegel/twig/git/commits{/sha}","comments_url":"https://api.github.com/repos/colin-kiegel/twig/comments{/number}","issue_comment_url":"https://api.github.com/repos/colin-kiegel/twig/issues/comments{/number}","contents_url":"https://api.github.com/repos/colin-kiegel/twig/contents/{+path}","compare_url":"https://api.github.com/repos/colin-kiegel/twig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/colin-kiegel/twig/merges","archive_url":"https://api.github.com/repos/colin-kiegel/twig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/colin-kiegel/twig/downloads","issues_url":"https://api.github.com/repos/colin-kiegel/twig/issues{/number}","pulls_url":"https://api.github.com/repos/colin-kiegel/twig/pulls{/number}","milestones_url":"https://api.github.com/repos/colin-kiegel/twig/milestones{/number}","notifications_url":"https://api.github.com/repos/colin-kiegel/twig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/colin-kiegel/twig/labels{/name}","releases_url":"https://api.github.com/repos/colin-kiegel/twig/releases{/id}","created_at":"2015-11-23T21:02:32Z","updated_at":"2015-11-23T21:02:33Z","pushed_at":"2015-12-06T13:29:56Z","git_url":"git://github.com/colin-kiegel/twig.git","ssh_url":"git@github.com:colin-kiegel/twig.git","clone_url":"https://github.com/colin-kiegel/twig.git","svn_url":"https://github.com/colin-kiegel/twig","homepage":"","size":54,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"rust-web:master","ref":"master","sha":"16ec1376028fbcd57d1deed4e1093ea73d8f57bb","user":{"login":"rust-web","id":15967019,"avatar_url":"https://avatars.githubusercontent.com/u/15967019?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-web","html_url":"https://github.com/rust-web","followers_url":"https://api.github.com/users/rust-web/followers","following_url":"https://api.github.com/users/rust-web/following{/other_user}","gists_url":"https://api.github.com/users/rust-web/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-web/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-web/subscriptions","organizations_url":"https://api.github.com/users/rust-web/orgs","repos_url":"https://api.github.com/users/rust-web/repos","events_url":"https://api.github.com/users/rust-web/events{/privacy}","received_events_url":"https://api.github.com/users/rust-web/received_events","type":"Organization","site_admin":false},"repo":{"id":46668013,"name":"twig","full_name":"rust-web/twig","owner":{"login":"rust-web","id":15967019,"avatar_url":"https://avatars.githubusercontent.com/u/15967019?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-web","html_url":"https://github.com/rust-web","followers_url":"https://api.github.com/users/rust-web/followers","following_url":"https://api.github.com/users/rust-web/following{/other_user}","gists_url":"https://api.github.com/users/rust-web/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-web/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-web/subscriptions","organizations_url":"https://api.github.com/users/rust-web/orgs","repos_url":"https://api.github.com/users/rust-web/repos","events_url":"https://api.github.com/users/rust-web/events{/privacy}","received_events_url":"https://api.github.com/users/rust-web/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-web/twig","description":"Twig templating engine for Rust; work in progress.","fork":false,"url":"https://api.github.com/repos/rust-web/twig","forks_url":"https://api.github.com/repos/rust-web/twig/forks","keys_url":"https://api.github.com/repos/rust-web/twig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-web/twig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-web/twig/teams","hooks_url":"https://api.github.com/repos/rust-web/twig/hooks","issue_events_url":"https://api.github.com/repos/rust-web/twig/issues/events{/number}","events_url":"https://api.github.com/repos/rust-web/twig/events","assignees_url":"https://api.github.com/repos/rust-web/twig/assignees{/user}","branches_url":"https://api.github.com/repos/rust-web/twig/branches{/branch}","tags_url":"https://api.github.com/repos/rust-web/twig/tags","blobs_url":"https://api.github.com/repos/rust-web/twig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-web/twig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-web/twig/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-web/twig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-web/twig/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-web/twig/languages","stargazers_url":"https://api.github.com/repos/rust-web/twig/stargazers","contributors_url":"https://api.github.com/repos/rust-web/twig/contributors","subscribers_url":"https://api.github.com/repos/rust-web/twig/subscribers","subscription_url":"https://api.github.com/repos/rust-web/twig/subscription","commits_url":"https://api.github.com/repos/rust-web/twig/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-web/twig/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-web/twig/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-web/twig/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-web/twig/contents/{+path}","compare_url":"https://api.github.com/repos/rust-web/twig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-web/twig/merges","archive_url":"https://api.github.com/repos/rust-web/twig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-web/twig/downloads","issues_url":"https://api.github.com/repos/rust-web/twig/issues{/number}","pulls_url":"https://api.github.com/repos/rust-web/twig/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-web/twig/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-web/twig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-web/twig/labels{/name}","releases_url":"https://api.github.com/repos/rust-web/twig/releases{/id}","created_at":"2015-11-22T16:07:32Z","updated_at":"2015-11-29T14:15:36Z","pushed_at":"2015-12-06T14:08:37Z","git_url":"git://github.com/rust-web/twig.git","ssh_url":"git@github.com:rust-web/twig.git","clone_url":"https://github.com/rust-web/twig.git","svn_url":"https://github.com/rust-web/twig","homepage":"http://rust-web.github.io/twig","size":588,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-web/twig/pulls/12"},"html":{"href":"https://github.com/rust-web/twig/pull/12"},"issue":{"href":"https://api.github.com/repos/rust-web/twig/issues/12"},"comments":{"href":"https://api.github.com/repos/rust-web/twig/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-web/twig/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-web/twig/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-web/twig/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/rust-web/twig/statuses/9d9d78adae8984be3ccee750f50dce465e83ac7f"}}}}