{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/comments/27236216","id":27236216,"diff_hunk":"@@ -358,39 +390,70 @@ def self.get_substitution_optional(token)\n     end\n   end\n \n-  def self.unquoted_text?(token)\n-    token.is_a?(UnquotedText)\n+  START = Token.new_without_origin(TokenType::START, \"start of file\", \"\")\n+  EOF = Token.new_without_origin(TokenType::EOF, \"end of file\", \"\")\n+  COMMA = Token.new_without_origin(TokenType::COMMA, \"','\", \",\")\n+  EQUALS = Token.new_without_origin(TokenType::EQUALS, \"'='\", \"=\")\n+  COLON = Token.new_without_origin(TokenType::COLON, \"':'\", \":\")\n+  OPEN_CURLY = Token.new_without_origin(TokenType::OPEN_CURLY, \"'{'\", \"{\")\n+  CLOSE_CURLY = Token.new_without_origin(TokenType::CLOSE_CURLY, \"'}'\", \"}\")\n+  OPEN_SQUARE = Token.new_without_origin(TokenType::OPEN_SQUARE, \"'['\", \"[\")\n+  CLOSE_SQUARE = Token.new_without_origin(TokenType::CLOSE_SQUARE, \"']'\", \"]\")\n+  PLUS_EQUALS = Token.new_without_origin(TokenType::PLUS_EQUALS, \"'+='\", \"+=\")\n+\n+  def self.new_line(origin)\n+    Line.new(origin)\n   end\n \n-  def self.unquoted_text(token)\n-    if unquoted_text?(token)\n-      token.value\n-    else\n-      raise ConfigBugOrBrokenError, \"tried to get unquoted text from #{token}\"\n-    end\n+  def self.new_problem(origin, what, message, suggest_quotes, cause)\n+    Problem.new(origin, what, message, suggest_quotes, cause)\n   end\n \n-  def self.value?(token)\n-    token.is_a?(Value)\n+  def self.new_comment_double_slash(origin, text)\n+    Comment::DoubleSlashComment.new(origin, text)\n   end\n \n-  def self.value(token)\n-    if token.is_a?(Value)\n-      token.value\n-    else\n-      raise ConfigBugOrBrokenError, \"tried to get value of non-value token #{token}\"\n-    end\n+  def self.new_comment_hash(origin, text)\n+    Comment::HashComment.new(origin, text)\n   end\n \n-  def self.value_with_type?(t, value_type)\n-    value?(t) && (value(t).value_type == value_type)\n+  def self.new_unquoted_text(origin, s)\n+    UnquotedText.new(origin, s)\n   end\n \n-  def self.newline?(t)\n-    t.is_a?(Line)\n+  def self.new_ignored_whitespace(origin, s)\n+    IgnoredWhitespace.new(origin, s)\n   end\n \n-  def self.problem?(t)\n-    t.is_a?(Problem)\n+  def self.new_substitution(origin, optional, expression)\n+    Substitution.new(origin, optional, expression)\n+  end\n+\n+  def self.new_value(value, orig_text = nil)\n+    Value.new(value, orig_text)\n+  end\n+\n+  def self.new_string(origin, value, orig_text)\n+    new_value(ConfigString.new(origin, value), orig_text)\n+  end\n+\n+  def self.new_int(origin, value, orig_text)\n+    new_value(ConfigNumber.new_number(origin, value, orig_text), orig_text)\n+  end\n+\n+  def self.new_double(origin, value, orig_text)\n+    new_value(ConfigNumber.new_number(origin, value, orig_text), orig_text)\n+  end\n+\n+  def self.new_long(origin, value, orig_text)","path":"lib/hocon/impl/tokens.rb","position":525,"original_position":525,"commit_id":"ef23d3576f4c7744a25e74e7ac1975116133aeed","original_commit_id":"ef23d3576f4c7744a25e74e7ac1975116133aeed","user":{"login":"fpringvaldsen","id":5620801,"avatar_url":"https://avatars.githubusercontent.com/u/5620801?v=3","gravatar_id":"","url":"https://api.github.com/users/fpringvaldsen","html_url":"https://github.com/fpringvaldsen","followers_url":"https://api.github.com/users/fpringvaldsen/followers","following_url":"https://api.github.com/users/fpringvaldsen/following{/other_user}","gists_url":"https://api.github.com/users/fpringvaldsen/gists{/gist_id}","starred_url":"https://api.github.com/users/fpringvaldsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpringvaldsen/subscriptions","organizations_url":"https://api.github.com/users/fpringvaldsen/orgs","repos_url":"https://api.github.com/users/fpringvaldsen/repos","events_url":"https://api.github.com/users/fpringvaldsen/events{/privacy}","received_events_url":"https://api.github.com/users/fpringvaldsen/received_events","type":"User","site_admin":false},"body":"Similar thing here, we don't really have longs in Ruby so this should probably be removed in favor of `new_int`.","created_at":"2015-03-26T17:34:51Z","updated_at":"2015-03-26T17:34:51Z","html_url":"https://github.com/puppetlabs/ruby-hocon/pull/40#discussion_r27236216","pull_request_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/comments/27236216"},"html":{"href":"https://github.com/puppetlabs/ruby-hocon/pull/40#discussion_r27236216"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/40","id":31967488,"html_url":"https://github.com/puppetlabs/ruby-hocon/pull/40","diff_url":"https://github.com/puppetlabs/ruby-hocon/pull/40.diff","patch_url":"https://github.com/puppetlabs/ruby-hocon/pull/40.patch","issue_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/40","number":40,"state":"open","locked":false,"title":"(MAINT) Update Parser to match latest upstream","user":{"login":"cprice404","id":1341071,"avatar_url":"https://avatars.githubusercontent.com/u/1341071?v=3","gravatar_id":"","url":"https://api.github.com/users/cprice404","html_url":"https://github.com/cprice404","followers_url":"https://api.github.com/users/cprice404/followers","following_url":"https://api.github.com/users/cprice404/following{/other_user}","gists_url":"https://api.github.com/users/cprice404/gists{/gist_id}","starred_url":"https://api.github.com/users/cprice404/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cprice404/subscriptions","organizations_url":"https://api.github.com/users/cprice404/orgs","repos_url":"https://api.github.com/users/cprice404/repos","events_url":"https://api.github.com/users/cprice404/events{/privacy}","received_events_url":"https://api.github.com/users/cprice404/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-25T21:24:07Z","updated_at":"2015-03-26T17:34:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9f2b63c8fad20385bf9894538ecdde21bf7ee4d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/40/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/40/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/40/comments","statuses_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/statuses/ef23d3576f4c7744a25e74e7ac1975116133aeed","head":{"label":"cprice404:maint/master/re-sync-parser-and-tokenizer","ref":"maint/master/re-sync-parser-and-tokenizer","sha":"ef23d3576f4c7744a25e74e7ac1975116133aeed","user":{"login":"cprice404","id":1341071,"avatar_url":"https://avatars.githubusercontent.com/u/1341071?v=3","gravatar_id":"","url":"https://api.github.com/users/cprice404","html_url":"https://github.com/cprice404","followers_url":"https://api.github.com/users/cprice404/followers","following_url":"https://api.github.com/users/cprice404/following{/other_user}","gists_url":"https://api.github.com/users/cprice404/gists{/gist_id}","starred_url":"https://api.github.com/users/cprice404/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cprice404/subscriptions","organizations_url":"https://api.github.com/users/cprice404/orgs","repos_url":"https://api.github.com/users/cprice404/repos","events_url":"https://api.github.com/users/cprice404/events{/privacy}","received_events_url":"https://api.github.com/users/cprice404/received_events","type":"User","site_admin":false},"repo":{"id":32554335,"name":"ruby-hocon","full_name":"cprice404/ruby-hocon","owner":{"login":"cprice404","id":1341071,"avatar_url":"https://avatars.githubusercontent.com/u/1341071?v=3","gravatar_id":"","url":"https://api.github.com/users/cprice404","html_url":"https://github.com/cprice404","followers_url":"https://api.github.com/users/cprice404/followers","following_url":"https://api.github.com/users/cprice404/following{/other_user}","gists_url":"https://api.github.com/users/cprice404/gists{/gist_id}","starred_url":"https://api.github.com/users/cprice404/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cprice404/subscriptions","organizations_url":"https://api.github.com/users/cprice404/orgs","repos_url":"https://api.github.com/users/cprice404/repos","events_url":"https://api.github.com/users/cprice404/events{/privacy}","received_events_url":"https://api.github.com/users/cprice404/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cprice404/ruby-hocon","description":"","fork":true,"url":"https://api.github.com/repos/cprice404/ruby-hocon","forks_url":"https://api.github.com/repos/cprice404/ruby-hocon/forks","keys_url":"https://api.github.com/repos/cprice404/ruby-hocon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cprice404/ruby-hocon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cprice404/ruby-hocon/teams","hooks_url":"https://api.github.com/repos/cprice404/ruby-hocon/hooks","issue_events_url":"https://api.github.com/repos/cprice404/ruby-hocon/issues/events{/number}","events_url":"https://api.github.com/repos/cprice404/ruby-hocon/events","assignees_url":"https://api.github.com/repos/cprice404/ruby-hocon/assignees{/user}","branches_url":"https://api.github.com/repos/cprice404/ruby-hocon/branches{/branch}","tags_url":"https://api.github.com/repos/cprice404/ruby-hocon/tags","blobs_url":"https://api.github.com/repos/cprice404/ruby-hocon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cprice404/ruby-hocon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cprice404/ruby-hocon/git/refs{/sha}","trees_url":"https://api.github.com/repos/cprice404/ruby-hocon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cprice404/ruby-hocon/statuses/{sha}","languages_url":"https://api.github.com/repos/cprice404/ruby-hocon/languages","stargazers_url":"https://api.github.com/repos/cprice404/ruby-hocon/stargazers","contributors_url":"https://api.github.com/repos/cprice404/ruby-hocon/contributors","subscribers_url":"https://api.github.com/repos/cprice404/ruby-hocon/subscribers","subscription_url":"https://api.github.com/repos/cprice404/ruby-hocon/subscription","commits_url":"https://api.github.com/repos/cprice404/ruby-hocon/commits{/sha}","git_commits_url":"https://api.github.com/repos/cprice404/ruby-hocon/git/commits{/sha}","comments_url":"https://api.github.com/repos/cprice404/ruby-hocon/comments{/number}","issue_comment_url":"https://api.github.com/repos/cprice404/ruby-hocon/issues/comments{/number}","contents_url":"https://api.github.com/repos/cprice404/ruby-hocon/contents/{+path}","compare_url":"https://api.github.com/repos/cprice404/ruby-hocon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cprice404/ruby-hocon/merges","archive_url":"https://api.github.com/repos/cprice404/ruby-hocon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cprice404/ruby-hocon/downloads","issues_url":"https://api.github.com/repos/cprice404/ruby-hocon/issues{/number}","pulls_url":"https://api.github.com/repos/cprice404/ruby-hocon/pulls{/number}","milestones_url":"https://api.github.com/repos/cprice404/ruby-hocon/milestones{/number}","notifications_url":"https://api.github.com/repos/cprice404/ruby-hocon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cprice404/ruby-hocon/labels{/name}","releases_url":"https://api.github.com/repos/cprice404/ruby-hocon/releases{/id}","created_at":"2015-03-20T00:49:03Z","updated_at":"2015-03-20T00:49:04Z","pushed_at":"2015-03-26T06:13:17Z","git_url":"git://github.com/cprice404/ruby-hocon.git","ssh_url":"git@github.com:cprice404/ruby-hocon.git","clone_url":"https://github.com/cprice404/ruby-hocon.git","svn_url":"https://github.com/cprice404/ruby-hocon","homepage":null,"size":613,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"puppetlabs:master","ref":"master","sha":"146f22bf0a6611238c8b0dcf16a61ae40fb631cc","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":17326988,"name":"ruby-hocon","full_name":"puppetlabs/ruby-hocon","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/ruby-hocon","description":"","fork":false,"url":"https://api.github.com/repos/puppetlabs/ruby-hocon","forks_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/forks","keys_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/teams","hooks_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/events","assignees_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/tags","blobs_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/subscription","commits_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/merges","archive_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/downloads","issues_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/ruby-hocon/releases{/id}","created_at":"2014-03-01T23:44:17Z","updated_at":"2015-03-26T00:36:25Z","pushed_at":"2015-03-26T06:10:58Z","git_url":"git://github.com/puppetlabs/ruby-hocon.git","ssh_url":"git@github.com:puppetlabs/ruby-hocon.git","clone_url":"https://github.com/puppetlabs/ruby-hocon.git","svn_url":"https://github.com/puppetlabs/ruby-hocon","homepage":null,"size":1201,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/40"},"html":{"href":"https://github.com/puppetlabs/ruby-hocon/pull/40"},"issue":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/40"},"comments":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/ruby-hocon/statuses/ef23d3576f4c7744a25e74e7ac1975116133aeed"}}}}