{"action":"created","issue":{"url":"https://api.github.com/repos/c2nes/javalang/issues/29","repository_url":"https://api.github.com/repos/c2nes/javalang","labels_url":"https://api.github.com/repos/c2nes/javalang/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/c2nes/javalang/issues/29/comments","events_url":"https://api.github.com/repos/c2nes/javalang/issues/29/events","html_url":"https://github.com/c2nes/javalang/issues/29","id":180359891,"number":29,"title":"Javalang doesn't support Java8 `default` keyword.","user":{"login":"roipoussiere","id":1665542,"avatar_url":"https://avatars.githubusercontent.com/u/1665542?v=3","gravatar_id":"","url":"https://api.github.com/users/roipoussiere","html_url":"https://github.com/roipoussiere","followers_url":"https://api.github.com/users/roipoussiere/followers","following_url":"https://api.github.com/users/roipoussiere/following{/other_user}","gists_url":"https://api.github.com/users/roipoussiere/gists{/gist_id}","starred_url":"https://api.github.com/users/roipoussiere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roipoussiere/subscriptions","organizations_url":"https://api.github.com/users/roipoussiere/orgs","repos_url":"https://api.github.com/users/roipoussiere/repos","events_url":"https://api.github.com/users/roipoussiere/events{/privacy}","received_events_url":"https://api.github.com/users/roipoussiere/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-30T17:33:02Z","updated_at":"2016-09-30T19:19:10Z","closed_at":"2016-09-30T18:07:43Z","body":"Let this simple Java8 code:\r\n\r\n    public interface Test{ default void save() {} }\r\n\r\nwhich works according to javac:\r\n\r\n    echo \"public interface Test{ default void save() {} }\" > Test.java\r\n    javac Test.java\r\n\r\nBut javalang throws a Syntax error. Here working in a clean virtual env., tested both with Py2 and Py3:\r\n\r\n```\r\nimport javalang\r\ntree = javalang.parse.parse(\"package javalang.brewtab.com; public interface Test{ default void save() {} }\")\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parse.py\", line 53, in parse\r\n    return parser.parse()\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 110, in parse\r\n    return self.parse_compilation_unit()\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 296, in parse_compilation_unit\r\n    type_declaration = self.parse_type_declaration()\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 341, in parse_type_declaration\r\n    return self.parse_class_or_interface_declaration()\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 354, in parse_class_or_interface_declaration\r\n    type_declaration = self.parse_normal_interface_declaration()\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 429, in parse_normal_interface_declaration\r\n    body = self.parse_interface_body()\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 945, in parse_interface_body\r\n    declaration = self.parse_interface_body_declaration()\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 960, in parse_interface_body_declaration\r\n    declaration = self.parse_interface_member_declaration()\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 986, in parse_interface_member_declaration\r\n    declaration = self.parse_interface_method_or_field_declaration()\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 992, in parse_interface_method_or_field_declaration\r\n    java_type = self.parse_type()\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 461, in parse_type\r\n    self.illegal(\"Expected type\")\r\n  File \"/home/roipoussiere/.local/lib/python2.7/site-packages/javalang/parser.py\", line 119, in illegal\r\n    raise JavaSyntaxError(description, at)\r\njavalang.parser.JavaSyntaxError\r\n```\r\n\r\nIt seems [this set](https://github.com/c2nes/javalang/blob/6d3e65e202f9df9a0819a19cf6d51587bd37eac5/javalang/tokenizer.py#L45) should contains `'default'` to support Java8."},"comment":{"url":"https://api.github.com/repos/c2nes/javalang/issues/comments/250830052","html_url":"https://github.com/c2nes/javalang/issues/29#issuecomment-250830052","issue_url":"https://api.github.com/repos/c2nes/javalang/issues/29","id":250830052,"user":{"login":"roipoussiere","id":1665542,"avatar_url":"https://avatars.githubusercontent.com/u/1665542?v=3","gravatar_id":"","url":"https://api.github.com/users/roipoussiere","html_url":"https://github.com/roipoussiere","followers_url":"https://api.github.com/users/roipoussiere/followers","following_url":"https://api.github.com/users/roipoussiere/following{/other_user}","gists_url":"https://api.github.com/users/roipoussiere/gists{/gist_id}","starred_url":"https://api.github.com/users/roipoussiere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roipoussiere/subscriptions","organizations_url":"https://api.github.com/users/roipoussiere/orgs","repos_url":"https://api.github.com/users/roipoussiere/repos","events_url":"https://api.github.com/users/roipoussiere/events{/privacy}","received_events_url":"https://api.github.com/users/roipoussiere/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T19:19:10Z","updated_at":"2016-09-30T19:19:10Z","body":"Well, not really fixed. :-)"}}
{"actor":{"display_login":"roipoussiere"}}