{"action":"created","comment":{"url":"https://api.github.com/repos/operable/fumanchu/pulls/comments/48561996","id":48561996,"diff_hunk":"@@ -74,4 +75,49 @@ defmodule FuManchu.LexerTest do\n \n     assert Lexer.scan(template) == {:ok, tokens}\n   end\n+\n+  test \"raises error for missing tag end\" do\n+    template = \"\"\"\n+    What's for dinner? {{!\n+    Please say lasagna.\n+    \"\"\"\n+\n+    error = %Lexer.TokenMissingError{message: ~s[template:3: missing terminator: \"}}\" (for \"{{\" starting at line 1)]}\n+\n+    assert Lexer.scan(template) == {:error, error}\n+  end\n+\n+  test \"raises error for unexpected tag begin\" do\n+    template = \"\"\"\n+    What's for dinner? {{!\n+    Please say lasagna.\n+    {{\n+    \"\"\"\n+\n+    error = %Lexer.TokenUnexpectedError{message: ~s[template:3: unexpected token: \"{{\"]}\n+\n+    assert Lexer.scan(template) == {:error, error}\n+  end\n+\n+  test \"raises error for unexpected escaped tag begin\" do\n+    template = \"\"\"\n+    What's for dinner? {{{food}}\n+    \"\"\"\n+\n+    error = %Lexer.TokenUnexpectedError{message: ~s[template:1: unexpected token: \"}}\"]}\n+\n+    assert Lexer.scan(template) == {:error, error}\n+  end\n+\n+  test \"warns for mismatched tag end\" do\n+    template = \"\"\"\n+    What's for dinner? {{food}}}\n+    \"\"\"\n+\n+    warning = capture_log(fn ->\n+      Lexer.scan(template)\n+    end)","path":"test/fumanchu/lexer_test.exs","position":52,"original_position":52,"commit_id":"e0b73d3a047b6ac5e2566caff2d759650e551200","original_commit_id":"e0b73d3a047b6ac5e2566caff2d759650e551200","user":{"login":"vanstee","id":228734,"avatar_url":"https://avatars.githubusercontent.com/u/228734?v=3","gravatar_id":"","url":"https://api.github.com/users/vanstee","html_url":"https://github.com/vanstee","followers_url":"https://api.github.com/users/vanstee/followers","following_url":"https://api.github.com/users/vanstee/following{/other_user}","gists_url":"https://api.github.com/users/vanstee/gists{/gist_id}","starred_url":"https://api.github.com/users/vanstee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanstee/subscriptions","organizations_url":"https://api.github.com/users/vanstee/orgs","repos_url":"https://api.github.com/users/vanstee/repos","events_url":"https://api.github.com/users/vanstee/events{/privacy}","received_events_url":"https://api.github.com/users/vanstee/received_events","type":"User","site_admin":false},"body":"<3 `capture_log` for stuff like this.","created_at":"2015-12-29T19:05:21Z","updated_at":"2015-12-29T19:05:21Z","html_url":"https://github.com/operable/fumanchu/pull/1#discussion_r48561996","pull_request_url":"https://api.github.com/repos/operable/fumanchu/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/operable/fumanchu/pulls/comments/48561996"},"html":{"href":"https://github.com/operable/fumanchu/pull/1#discussion_r48561996"},"pull_request":{"href":"https://api.github.com/repos/operable/fumanchu/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/operable/fumanchu/pulls/1","id":54684374,"html_url":"https://github.com/operable/fumanchu/pull/1","diff_url":"https://github.com/operable/fumanchu/pull/1.diff","patch_url":"https://github.com/operable/fumanchu/pull/1.patch","issue_url":"https://api.github.com/repos/operable/fumanchu/issues/1","number":1,"state":"open","locked":false,"title":"Returns and raises error messages","user":{"login":"vanstee","id":228734,"avatar_url":"https://avatars.githubusercontent.com/u/228734?v=3","gravatar_id":"","url":"https://api.github.com/users/vanstee","html_url":"https://github.com/vanstee","followers_url":"https://api.github.com/users/vanstee/followers","following_url":"https://api.github.com/users/vanstee/following{/other_user}","gists_url":"https://api.github.com/users/vanstee/gists{/gist_id}","starred_url":"https://api.github.com/users/vanstee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanstee/subscriptions","organizations_url":"https://api.github.com/users/vanstee/orgs","repos_url":"https://api.github.com/users/vanstee/repos","events_url":"https://api.github.com/users/vanstee/events{/privacy}","received_events_url":"https://api.github.com/users/vanstee/received_events","type":"User","site_admin":false},"body":"Returns error messages and emit warnings (well just 1 kind) during lexing, parsing and generating. Errors are raised if returned to the compiler.","created_at":"2015-12-28T21:16:36Z","updated_at":"2015-12-29T19:05:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60e8819646b8cd7b79dfe3c55a6245ec5e57c47d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/operable/fumanchu/pulls/1/commits","review_comments_url":"https://api.github.com/repos/operable/fumanchu/pulls/1/comments","review_comment_url":"https://api.github.com/repos/operable/fumanchu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/operable/fumanchu/issues/1/comments","statuses_url":"https://api.github.com/repos/operable/fumanchu/statuses/e0b73d3a047b6ac5e2566caff2d759650e551200","head":{"label":"operable:error-messages","ref":"error-messages","sha":"e0b73d3a047b6ac5e2566caff2d759650e551200","user":{"login":"operable","id":6070463,"avatar_url":"https://avatars.githubusercontent.com/u/6070463?v=3","gravatar_id":"","url":"https://api.github.com/users/operable","html_url":"https://github.com/operable","followers_url":"https://api.github.com/users/operable/followers","following_url":"https://api.github.com/users/operable/following{/other_user}","gists_url":"https://api.github.com/users/operable/gists{/gist_id}","starred_url":"https://api.github.com/users/operable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/operable/subscriptions","organizations_url":"https://api.github.com/users/operable/orgs","repos_url":"https://api.github.com/users/operable/repos","events_url":"https://api.github.com/users/operable/events{/privacy}","received_events_url":"https://api.github.com/users/operable/received_events","type":"Organization","site_admin":false},"repo":{"id":48253370,"name":"fumanchu","full_name":"operable/fumanchu","owner":{"login":"operable","id":6070463,"avatar_url":"https://avatars.githubusercontent.com/u/6070463?v=3","gravatar_id":"","url":"https://api.github.com/users/operable","html_url":"https://github.com/operable","followers_url":"https://api.github.com/users/operable/followers","following_url":"https://api.github.com/users/operable/following{/other_user}","gists_url":"https://api.github.com/users/operable/gists{/gist_id}","starred_url":"https://api.github.com/users/operable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/operable/subscriptions","organizations_url":"https://api.github.com/users/operable/orgs","repos_url":"https://api.github.com/users/operable/repos","events_url":"https://api.github.com/users/operable/events{/privacy}","received_events_url":"https://api.github.com/users/operable/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/operable/fumanchu","description":"","fork":false,"url":"https://api.github.com/repos/operable/fumanchu","forks_url":"https://api.github.com/repos/operable/fumanchu/forks","keys_url":"https://api.github.com/repos/operable/fumanchu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/operable/fumanchu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/operable/fumanchu/teams","hooks_url":"https://api.github.com/repos/operable/fumanchu/hooks","issue_events_url":"https://api.github.com/repos/operable/fumanchu/issues/events{/number}","events_url":"https://api.github.com/repos/operable/fumanchu/events","assignees_url":"https://api.github.com/repos/operable/fumanchu/assignees{/user}","branches_url":"https://api.github.com/repos/operable/fumanchu/branches{/branch}","tags_url":"https://api.github.com/repos/operable/fumanchu/tags","blobs_url":"https://api.github.com/repos/operable/fumanchu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/operable/fumanchu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/operable/fumanchu/git/refs{/sha}","trees_url":"https://api.github.com/repos/operable/fumanchu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/operable/fumanchu/statuses/{sha}","languages_url":"https://api.github.com/repos/operable/fumanchu/languages","stargazers_url":"https://api.github.com/repos/operable/fumanchu/stargazers","contributors_url":"https://api.github.com/repos/operable/fumanchu/contributors","subscribers_url":"https://api.github.com/repos/operable/fumanchu/subscribers","subscription_url":"https://api.github.com/repos/operable/fumanchu/subscription","commits_url":"https://api.github.com/repos/operable/fumanchu/commits{/sha}","git_commits_url":"https://api.github.com/repos/operable/fumanchu/git/commits{/sha}","comments_url":"https://api.github.com/repos/operable/fumanchu/comments{/number}","issue_comment_url":"https://api.github.com/repos/operable/fumanchu/issues/comments{/number}","contents_url":"https://api.github.com/repos/operable/fumanchu/contents/{+path}","compare_url":"https://api.github.com/repos/operable/fumanchu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/operable/fumanchu/merges","archive_url":"https://api.github.com/repos/operable/fumanchu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/operable/fumanchu/downloads","issues_url":"https://api.github.com/repos/operable/fumanchu/issues{/number}","pulls_url":"https://api.github.com/repos/operable/fumanchu/pulls{/number}","milestones_url":"https://api.github.com/repos/operable/fumanchu/milestones{/number}","notifications_url":"https://api.github.com/repos/operable/fumanchu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/operable/fumanchu/labels{/name}","releases_url":"https://api.github.com/repos/operable/fumanchu/releases{/id}","created_at":"2015-12-18T19:43:46Z","updated_at":"2015-12-21T06:41:49Z","pushed_at":"2015-12-29T19:02:47Z","git_url":"git://github.com/operable/fumanchu.git","ssh_url":"git@github.com:operable/fumanchu.git","clone_url":"https://github.com/operable/fumanchu.git","svn_url":"https://github.com/operable/fumanchu","homepage":null,"size":49,"stargazers_count":1,"watchers_count":1,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"operable:master","ref":"master","sha":"5b3616fe94db420f986813e662915ff17c7c2aef","user":{"login":"operable","id":6070463,"avatar_url":"https://avatars.githubusercontent.com/u/6070463?v=3","gravatar_id":"","url":"https://api.github.com/users/operable","html_url":"https://github.com/operable","followers_url":"https://api.github.com/users/operable/followers","following_url":"https://api.github.com/users/operable/following{/other_user}","gists_url":"https://api.github.com/users/operable/gists{/gist_id}","starred_url":"https://api.github.com/users/operable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/operable/subscriptions","organizations_url":"https://api.github.com/users/operable/orgs","repos_url":"https://api.github.com/users/operable/repos","events_url":"https://api.github.com/users/operable/events{/privacy}","received_events_url":"https://api.github.com/users/operable/received_events","type":"Organization","site_admin":false},"repo":{"id":48253370,"name":"fumanchu","full_name":"operable/fumanchu","owner":{"login":"operable","id":6070463,"avatar_url":"https://avatars.githubusercontent.com/u/6070463?v=3","gravatar_id":"","url":"https://api.github.com/users/operable","html_url":"https://github.com/operable","followers_url":"https://api.github.com/users/operable/followers","following_url":"https://api.github.com/users/operable/following{/other_user}","gists_url":"https://api.github.com/users/operable/gists{/gist_id}","starred_url":"https://api.github.com/users/operable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/operable/subscriptions","organizations_url":"https://api.github.com/users/operable/orgs","repos_url":"https://api.github.com/users/operable/repos","events_url":"https://api.github.com/users/operable/events{/privacy}","received_events_url":"https://api.github.com/users/operable/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/operable/fumanchu","description":"","fork":false,"url":"https://api.github.com/repos/operable/fumanchu","forks_url":"https://api.github.com/repos/operable/fumanchu/forks","keys_url":"https://api.github.com/repos/operable/fumanchu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/operable/fumanchu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/operable/fumanchu/teams","hooks_url":"https://api.github.com/repos/operable/fumanchu/hooks","issue_events_url":"https://api.github.com/repos/operable/fumanchu/issues/events{/number}","events_url":"https://api.github.com/repos/operable/fumanchu/events","assignees_url":"https://api.github.com/repos/operable/fumanchu/assignees{/user}","branches_url":"https://api.github.com/repos/operable/fumanchu/branches{/branch}","tags_url":"https://api.github.com/repos/operable/fumanchu/tags","blobs_url":"https://api.github.com/repos/operable/fumanchu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/operable/fumanchu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/operable/fumanchu/git/refs{/sha}","trees_url":"https://api.github.com/repos/operable/fumanchu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/operable/fumanchu/statuses/{sha}","languages_url":"https://api.github.com/repos/operable/fumanchu/languages","stargazers_url":"https://api.github.com/repos/operable/fumanchu/stargazers","contributors_url":"https://api.github.com/repos/operable/fumanchu/contributors","subscribers_url":"https://api.github.com/repos/operable/fumanchu/subscribers","subscription_url":"https://api.github.com/repos/operable/fumanchu/subscription","commits_url":"https://api.github.com/repos/operable/fumanchu/commits{/sha}","git_commits_url":"https://api.github.com/repos/operable/fumanchu/git/commits{/sha}","comments_url":"https://api.github.com/repos/operable/fumanchu/comments{/number}","issue_comment_url":"https://api.github.com/repos/operable/fumanchu/issues/comments{/number}","contents_url":"https://api.github.com/repos/operable/fumanchu/contents/{+path}","compare_url":"https://api.github.com/repos/operable/fumanchu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/operable/fumanchu/merges","archive_url":"https://api.github.com/repos/operable/fumanchu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/operable/fumanchu/downloads","issues_url":"https://api.github.com/repos/operable/fumanchu/issues{/number}","pulls_url":"https://api.github.com/repos/operable/fumanchu/pulls{/number}","milestones_url":"https://api.github.com/repos/operable/fumanchu/milestones{/number}","notifications_url":"https://api.github.com/repos/operable/fumanchu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/operable/fumanchu/labels{/name}","releases_url":"https://api.github.com/repos/operable/fumanchu/releases{/id}","created_at":"2015-12-18T19:43:46Z","updated_at":"2015-12-21T06:41:49Z","pushed_at":"2015-12-29T19:02:47Z","git_url":"git://github.com/operable/fumanchu.git","ssh_url":"git@github.com:operable/fumanchu.git","clone_url":"https://github.com/operable/fumanchu.git","svn_url":"https://github.com/operable/fumanchu","homepage":null,"size":49,"stargazers_count":1,"watchers_count":1,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/operable/fumanchu/pulls/1"},"html":{"href":"https://github.com/operable/fumanchu/pull/1"},"issue":{"href":"https://api.github.com/repos/operable/fumanchu/issues/1"},"comments":{"href":"https://api.github.com/repos/operable/fumanchu/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/operable/fumanchu/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/operable/fumanchu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/operable/fumanchu/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/operable/fumanchu/statuses/e0b73d3a047b6ac5e2566caff2d759650e551200"}}}}