{"action":"created","issue":{"url":"https://api.github.com/repos/zig-lang/zig/issues/873","repository_url":"https://api.github.com/repos/zig-lang/zig","labels_url":"https://api.github.com/repos/zig-lang/zig/issues/873/labels{/name}","comments_url":"https://api.github.com/repos/zig-lang/zig/issues/873/comments","events_url":"https://api.github.com/repos/zig-lang/zig/issues/873/events","html_url":"https://github.com/zig-lang/zig/pull/873","id":310187483,"number":873,"title":"Self hosted parser completion","user":{"login":"Hejsil","id":3759175,"avatar_url":"https://avatars3.githubusercontent.com/u/3759175?v=4","gravatar_id":"","url":"https://api.github.com/users/Hejsil","html_url":"https://github.com/Hejsil","followers_url":"https://api.github.com/users/Hejsil/followers","following_url":"https://api.github.com/users/Hejsil/following{/other_user}","gists_url":"https://api.github.com/users/Hejsil/gists{/gist_id}","starred_url":"https://api.github.com/users/Hejsil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hejsil/subscriptions","organizations_url":"https://api.github.com/users/Hejsil/orgs","repos_url":"https://api.github.com/users/Hejsil/repos","events_url":"https://api.github.com/users/Hejsil/events{/privacy}","received_events_url":"https://api.github.com/users/Hejsil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-30T22:57:51Z","updated_at":"2018-04-03T07:59:54Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/zig-lang/zig/pulls/873","html_url":"https://github.com/zig-lang/zig/pull/873","diff_url":"https://github.com/zig-lang/zig/pull/873.diff","patch_url":"https://github.com/zig-lang/zig/pull/873.patch"},"body":"This is in no way done, but I thought, that instead of just pushing my work on the self-hosted parser to master, I would make this PR. This allows me to write a lot of tests that fail, and slowly work towards getting them all passing.\r\n\r\nChecklist!\r\n- [x] `extern \"c\" fn puts(s: &const u8) c_int;`\r\n- [x] Muti line strings\r\n- [x] Indexing\r\n- [x] Slicing\r\n- [ ] Types\r\n  - [ ] Array\r\n  - [ ] Slice\r\n  - [ ] Function\r\n  - [x] `error`\r\n- [x] Literals\r\n  - [x] Boolean\r\n  - [x] Char\r\n  - [x] `null`\r\n- [x] `unreachable`\r\n- [x] `this`\r\n- [ ] Operator precedence and expression grouping (parentheses)\r\n- [ ] Struct declaration\r\n- [ ] Enum declaration\r\n- [ ] Union declaration\r\n- [ ] Error set declaration\r\n- [ ] Container initializers\r\n- [ ] `switch`\r\n- [ ] `while`\r\n- [ ] `for`\r\n- [ ] `if`\r\n- [ ] `defer`\r\n- [ ] `catch`\r\n- [ ] `comptime`\r\n- [ ] Inline assembly\r\n- [ ] Coroutines\r\n\r\nWhen all these are checked and the self-hosted parser can parse the entire std library and all tests, then it's ready for a merge."},"comment":{"url":"https://api.github.com/repos/zig-lang/zig/issues/comments/378162770","html_url":"https://github.com/zig-lang/zig/pull/873#issuecomment-378162770","issue_url":"https://api.github.com/repos/zig-lang/zig/issues/873","id":378162770,"user":{"login":"Hejsil","id":3759175,"avatar_url":"https://avatars3.githubusercontent.com/u/3759175?v=4","gravatar_id":"","url":"https://api.github.com/users/Hejsil","html_url":"https://github.com/Hejsil","followers_url":"https://api.github.com/users/Hejsil/followers","following_url":"https://api.github.com/users/Hejsil/following{/other_user}","gists_url":"https://api.github.com/users/Hejsil/gists{/gist_id}","starred_url":"https://api.github.com/users/Hejsil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hejsil/subscriptions","organizations_url":"https://api.github.com/users/Hejsil/orgs","repos_url":"https://api.github.com/users/Hejsil/repos","events_url":"https://api.github.com/users/Hejsil/events{/privacy}","received_events_url":"https://api.github.com/users/Hejsil/received_events","type":"User","site_admin":false},"created_at":"2018-04-03T07:59:54Z","updated_at":"2018-04-03T07:59:54Z","author_association":"OWNER","body":"@andrewrk The variable declaration syntax in the self-hosted parser is currently not being parsed correctly. `var a: u8 = 1;` is parsed into`var a: ( u8 = 1 ) ;`.\r\n\r\nIn the C++ compiler, this is solved by parsing type expressions as prefix operators first and therefore requiring parentheses for infix operators to be used in type expressions. This solution cannot be used in the self-hosted parser because of the way expressions are parsed.\r\n\r\nDo we rewrite expression parsing to make this work or disallow assignment as an expression? "}}
{"actor":{"display_login":"Hejsil"}}