{"action":"created","comment":{"url":"https://api.github.com/repos/scalameta/scalameta/pulls/comments/31277225","id":31277225,"diff_hunk":"@@ -1070,17 +1070,40 @@ private[meta] class Parser(val input: Input)(implicit val dialect: Dialect) { pa\n    */\n   def literal(isNegated: Boolean = false): Lit = autoPos {\n     val res = token match {\n-      case token: Literal.Char    => Lit.Char(token.value)\n-      case token: Literal.Int     => Lit.Int(token.value(isNegated))\n-      case token: Literal.Long    => Lit.Long(token.value(isNegated))\n-      case token: Literal.Float   => Lit.Float(token.value(isNegated))\n-      case token: Literal.Double  => Lit.Double(token.value(isNegated))\n-      case token: Literal.String  => Lit.String(token.value)\n-      case token: Literal.Symbol  => Lit.Symbol(token.value)\n-      case token: Literal.`true`  => Lit.Bool(true)\n-      case token: Literal.`false` => Lit.Bool(false)\n-      case token: Literal.`null`  => Lit.Null()\n-      case _                      => unreachable(debug(token))\n+      case token: Literal.Char =>\n+        Lit.Char(token.value)\n+      case token: Literal.Int =>\n+        val value = if (isNegated) -token.value else token.value\n+        if (value > Int.MaxValue) syntaxError(\"integer number too large\", at = token)\n+        else if (value < Int.MinValue) syntaxError(\"integer number too small\", at = token)\n+        else Lit.Int(value.toInt)\n+      case token: Literal.Long =>\n+        val value = if (isNegated) -token.value else token.value\n+        if (value > Long.MaxValue) syntaxError(\"integer number too large\", at = token)\n+        else if (value < Long.MinValue) syntaxError(\"integer number too small\", at = token)\n+        else Lit.Long(value.toLong)\n+      case token: Literal.Float =>\n+        val value = if (isNegated) -token.value else token.value\n+        if (value > Float.MaxValue) syntaxError(\"floating point number too large\", at = token)\n+        else if (value < Float.MinValue) syntaxError(\"floating point number too small\", at = token)\n+        else Lit.Float(value.toLong)","path":"scalameta/src/main/scala/scala/meta/internal/parsers/Parsers.scala","position":31,"original_position":31,"commit_id":"f01dff595ad49add82a2feba8375022156c10b2b","original_commit_id":"f01dff595ad49add82a2feba8375022156c10b2b","user":{"login":"mdemarne","id":2266330,"avatar_url":"https://avatars.githubusercontent.com/u/2266330?v=3","gravatar_id":"","url":"https://api.github.com/users/mdemarne","html_url":"https://github.com/mdemarne","followers_url":"https://api.github.com/users/mdemarne/followers","following_url":"https://api.github.com/users/mdemarne/following{/other_user}","gists_url":"https://api.github.com/users/mdemarne/gists{/gist_id}","starred_url":"https://api.github.com/users/mdemarne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdemarne/subscriptions","organizations_url":"https://api.github.com/users/mdemarne/orgs","repos_url":"https://api.github.com/users/mdemarne/repos","events_url":"https://api.github.com/users/mdemarne/events{/privacy}","received_events_url":"https://api.github.com/users/mdemarne/received_events","type":"User","site_admin":false},"body":"Hey, I think there is a small error there:\r\n\r\n```\r\nscala> \"23.45F\".parse[Term].show[Raw]\r\nres5: String = Lit.Float(23.0f)\r\n```\r\nI guess it should be `value.toFloat`, and should be changed  for Double (below) as well.","created_at":"2015-05-28T20:59:25Z","updated_at":"2015-05-28T20:59:25Z","html_url":"https://github.com/scalameta/scalameta/pull/138#discussion_r31277225","pull_request_url":"https://api.github.com/repos/scalameta/scalameta/pulls/138","_links":{"self":{"href":"https://api.github.com/repos/scalameta/scalameta/pulls/comments/31277225"},"html":{"href":"https://github.com/scalameta/scalameta/pull/138#discussion_r31277225"},"pull_request":{"href":"https://api.github.com/repos/scalameta/scalameta/pulls/138"}}},"pull_request":{"url":"https://api.github.com/repos/scalameta/scalameta/pulls/138","id":36317779,"html_url":"https://github.com/scalameta/scalameta/pull/138","diff_url":"https://github.com/scalameta/scalameta/pull/138.diff","patch_url":"https://github.com/scalameta/scalameta/pull/138.patch","issue_url":"https://api.github.com/repos/scalameta/scalameta/issues/138","number":138,"state":"closed","locked":false,"title":"miscellaneous fixed for @mdemarne","user":{"login":"xeno-by","id":609152,"avatar_url":"https://avatars.githubusercontent.com/u/609152?v=3","gravatar_id":"","url":"https://api.github.com/users/xeno-by","html_url":"https://github.com/xeno-by","followers_url":"https://api.github.com/users/xeno-by/followers","following_url":"https://api.github.com/users/xeno-by/following{/other_user}","gists_url":"https://api.github.com/users/xeno-by/gists{/gist_id}","starred_url":"https://api.github.com/users/xeno-by/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeno-by/subscriptions","organizations_url":"https://api.github.com/users/xeno-by/orgs","repos_url":"https://api.github.com/users/xeno-by/repos","events_url":"https://api.github.com/users/xeno-by/events{/privacy}","received_events_url":"https://api.github.com/users/xeno-by/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-27T15:43:06Z","updated_at":"2015-05-28T20:59:25Z","closed_at":"2015-05-27T15:50:06Z","merged_at":"2015-05-27T15:50:06Z","merge_commit_sha":"9ebda74e33ef19c0e928a0494b2f6eba78ab42d4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scalameta/scalameta/pulls/138/commits","review_comments_url":"https://api.github.com/repos/scalameta/scalameta/pulls/138/comments","review_comment_url":"https://api.github.com/repos/scalameta/scalameta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scalameta/scalameta/issues/138/comments","statuses_url":"https://api.github.com/repos/scalameta/scalameta/statuses/f01dff595ad49add82a2feba8375022156c10b2b","head":{"label":"xeno-by:master","ref":"master","sha":"f01dff595ad49add82a2feba8375022156c10b2b","user":{"login":"xeno-by","id":609152,"avatar_url":"https://avatars.githubusercontent.com/u/609152?v=3","gravatar_id":"","url":"https://api.github.com/users/xeno-by","html_url":"https://github.com/xeno-by","followers_url":"https://api.github.com/users/xeno-by/followers","following_url":"https://api.github.com/users/xeno-by/following{/other_user}","gists_url":"https://api.github.com/users/xeno-by/gists{/gist_id}","starred_url":"https://api.github.com/users/xeno-by/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeno-by/subscriptions","organizations_url":"https://api.github.com/users/xeno-by/orgs","repos_url":"https://api.github.com/users/xeno-by/repos","events_url":"https://api.github.com/users/xeno-by/events{/privacy}","received_events_url":"https://api.github.com/users/xeno-by/received_events","type":"User","site_admin":false},"repo":{"id":20904962,"name":"scalameta","full_name":"xeno-by/scalameta","owner":{"login":"xeno-by","id":609152,"avatar_url":"https://avatars.githubusercontent.com/u/609152?v=3","gravatar_id":"","url":"https://api.github.com/users/xeno-by","html_url":"https://github.com/xeno-by","followers_url":"https://api.github.com/users/xeno-by/followers","following_url":"https://api.github.com/users/xeno-by/following{/other_user}","gists_url":"https://api.github.com/users/xeno-by/gists{/gist_id}","starred_url":"https://api.github.com/users/xeno-by/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeno-by/subscriptions","organizations_url":"https://api.github.com/users/xeno-by/orgs","repos_url":"https://api.github.com/users/xeno-by/repos","events_url":"https://api.github.com/users/xeno-by/events{/privacy}","received_events_url":"https://api.github.com/users/xeno-by/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xeno-by/scalameta","description":"Simple, robust and portable metaprogramming toolkit for Scala","fork":true,"url":"https://api.github.com/repos/xeno-by/scalameta","forks_url":"https://api.github.com/repos/xeno-by/scalameta/forks","keys_url":"https://api.github.com/repos/xeno-by/scalameta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xeno-by/scalameta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xeno-by/scalameta/teams","hooks_url":"https://api.github.com/repos/xeno-by/scalameta/hooks","issue_events_url":"https://api.github.com/repos/xeno-by/scalameta/issues/events{/number}","events_url":"https://api.github.com/repos/xeno-by/scalameta/events","assignees_url":"https://api.github.com/repos/xeno-by/scalameta/assignees{/user}","branches_url":"https://api.github.com/repos/xeno-by/scalameta/branches{/branch}","tags_url":"https://api.github.com/repos/xeno-by/scalameta/tags","blobs_url":"https://api.github.com/repos/xeno-by/scalameta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xeno-by/scalameta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xeno-by/scalameta/git/refs{/sha}","trees_url":"https://api.github.com/repos/xeno-by/scalameta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xeno-by/scalameta/statuses/{sha}","languages_url":"https://api.github.com/repos/xeno-by/scalameta/languages","stargazers_url":"https://api.github.com/repos/xeno-by/scalameta/stargazers","contributors_url":"https://api.github.com/repos/xeno-by/scalameta/contributors","subscribers_url":"https://api.github.com/repos/xeno-by/scalameta/subscribers","subscription_url":"https://api.github.com/repos/xeno-by/scalameta/subscription","commits_url":"https://api.github.com/repos/xeno-by/scalameta/commits{/sha}","git_commits_url":"https://api.github.com/repos/xeno-by/scalameta/git/commits{/sha}","comments_url":"https://api.github.com/repos/xeno-by/scalameta/comments{/number}","issue_comment_url":"https://api.github.com/repos/xeno-by/scalameta/issues/comments{/number}","contents_url":"https://api.github.com/repos/xeno-by/scalameta/contents/{+path}","compare_url":"https://api.github.com/repos/xeno-by/scalameta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xeno-by/scalameta/merges","archive_url":"https://api.github.com/repos/xeno-by/scalameta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xeno-by/scalameta/downloads","issues_url":"https://api.github.com/repos/xeno-by/scalameta/issues{/number}","pulls_url":"https://api.github.com/repos/xeno-by/scalameta/pulls{/number}","milestones_url":"https://api.github.com/repos/xeno-by/scalameta/milestones{/number}","notifications_url":"https://api.github.com/repos/xeno-by/scalameta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xeno-by/scalameta/labels{/name}","releases_url":"https://api.github.com/repos/xeno-by/scalameta/releases{/id}","created_at":"2014-06-17T00:24:43Z","updated_at":"2015-05-08T12:05:23Z","pushed_at":"2015-05-28T12:24:55Z","git_url":"git://github.com/xeno-by/scalameta.git","ssh_url":"git@github.com:xeno-by/scalameta.git","clone_url":"https://github.com/xeno-by/scalameta.git","svn_url":"https://github.com/xeno-by/scalameta","homepage":null,"size":5552,"stargazers_count":1,"watchers_count":1,"language":"Scala","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":1,"default_branch":"master"}},"base":{"label":"scalameta:master","ref":"master","sha":"ab7170b67ff6debf0c0f5a551f314d1156662a8f","user":{"login":"scalameta","id":7526438,"avatar_url":"https://avatars.githubusercontent.com/u/7526438?v=3","gravatar_id":"","url":"https://api.github.com/users/scalameta","html_url":"https://github.com/scalameta","followers_url":"https://api.github.com/users/scalameta/followers","following_url":"https://api.github.com/users/scalameta/following{/other_user}","gists_url":"https://api.github.com/users/scalameta/gists{/gist_id}","starred_url":"https://api.github.com/users/scalameta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalameta/subscriptions","organizations_url":"https://api.github.com/users/scalameta/orgs","repos_url":"https://api.github.com/users/scalameta/repos","events_url":"https://api.github.com/users/scalameta/events{/privacy}","received_events_url":"https://api.github.com/users/scalameta/received_events","type":"Organization","site_admin":false},"repo":{"id":20903383,"name":"scalameta","full_name":"scalameta/scalameta","owner":{"login":"scalameta","id":7526438,"avatar_url":"https://avatars.githubusercontent.com/u/7526438?v=3","gravatar_id":"","url":"https://api.github.com/users/scalameta","html_url":"https://github.com/scalameta","followers_url":"https://api.github.com/users/scalameta/followers","following_url":"https://api.github.com/users/scalameta/following{/other_user}","gists_url":"https://api.github.com/users/scalameta/gists{/gist_id}","starred_url":"https://api.github.com/users/scalameta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalameta/subscriptions","organizations_url":"https://api.github.com/users/scalameta/orgs","repos_url":"https://api.github.com/users/scalameta/repos","events_url":"https://api.github.com/users/scalameta/events{/privacy}","received_events_url":"https://api.github.com/users/scalameta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scalameta/scalameta","description":"Simple, robust and portable metaprogramming toolkit for Scala","fork":false,"url":"https://api.github.com/repos/scalameta/scalameta","forks_url":"https://api.github.com/repos/scalameta/scalameta/forks","keys_url":"https://api.github.com/repos/scalameta/scalameta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scalameta/scalameta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scalameta/scalameta/teams","hooks_url":"https://api.github.com/repos/scalameta/scalameta/hooks","issue_events_url":"https://api.github.com/repos/scalameta/scalameta/issues/events{/number}","events_url":"https://api.github.com/repos/scalameta/scalameta/events","assignees_url":"https://api.github.com/repos/scalameta/scalameta/assignees{/user}","branches_url":"https://api.github.com/repos/scalameta/scalameta/branches{/branch}","tags_url":"https://api.github.com/repos/scalameta/scalameta/tags","blobs_url":"https://api.github.com/repos/scalameta/scalameta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scalameta/scalameta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scalameta/scalameta/git/refs{/sha}","trees_url":"https://api.github.com/repos/scalameta/scalameta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scalameta/scalameta/statuses/{sha}","languages_url":"https://api.github.com/repos/scalameta/scalameta/languages","stargazers_url":"https://api.github.com/repos/scalameta/scalameta/stargazers","contributors_url":"https://api.github.com/repos/scalameta/scalameta/contributors","subscribers_url":"https://api.github.com/repos/scalameta/scalameta/subscribers","subscription_url":"https://api.github.com/repos/scalameta/scalameta/subscription","commits_url":"https://api.github.com/repos/scalameta/scalameta/commits{/sha}","git_commits_url":"https://api.github.com/repos/scalameta/scalameta/git/commits{/sha}","comments_url":"https://api.github.com/repos/scalameta/scalameta/comments{/number}","issue_comment_url":"https://api.github.com/repos/scalameta/scalameta/issues/comments{/number}","contents_url":"https://api.github.com/repos/scalameta/scalameta/contents/{+path}","compare_url":"https://api.github.com/repos/scalameta/scalameta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scalameta/scalameta/merges","archive_url":"https://api.github.com/repos/scalameta/scalameta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scalameta/scalameta/downloads","issues_url":"https://api.github.com/repos/scalameta/scalameta/issues{/number}","pulls_url":"https://api.github.com/repos/scalameta/scalameta/pulls{/number}","milestones_url":"https://api.github.com/repos/scalameta/scalameta/milestones{/number}","notifications_url":"https://api.github.com/repos/scalameta/scalameta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scalameta/scalameta/labels{/name}","releases_url":"https://api.github.com/repos/scalameta/scalameta/releases{/id}","created_at":"2014-06-16T23:00:32Z","updated_at":"2015-05-26T07:08:38Z","pushed_at":"2015-05-27T15:50:06Z","git_url":"git://github.com/scalameta/scalameta.git","ssh_url":"git@github.com:scalameta/scalameta.git","clone_url":"https://github.com/scalameta/scalameta.git","svn_url":"https://github.com/scalameta/scalameta","homepage":null,"size":4053,"stargazers_count":92,"watchers_count":92,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":6,"forks":13,"open_issues":6,"watchers":92,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scalameta/scalameta/pulls/138"},"html":{"href":"https://github.com/scalameta/scalameta/pull/138"},"issue":{"href":"https://api.github.com/repos/scalameta/scalameta/issues/138"},"comments":{"href":"https://api.github.com/repos/scalameta/scalameta/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/scalameta/scalameta/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/scalameta/scalameta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scalameta/scalameta/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/scalameta/scalameta/statuses/f01dff595ad49add82a2feba8375022156c10b2b"}}}}