{"slug": "zig-ast-explorer", "title": "Zig AST explorer", "summary": "Kurt Wagner released Zlinter, a static website that packages Zig's AST parser to let developers explore tokenizer and parser output, targeting Zig 0.14.1. The tool, built with plain JS and CSS, has been praised by Zig compiler contributor matklad for aiding work on a new resilient parser experiment. A known issue is that file-level doc comments (//!) are not tokenized.", "body_md": "[Kurt](https://ziggit.dev/u/Kurt)\n1\n \nHello all,\n\nI was poking about writing a linter between projects for personal use when I get even more distracted (linter was already a distraction) by the idea of packaging zigs AST parser into a static website to explore what the tokeniser and parser were producing\n\n[Zlinter - Zig AST explorer](https://kurtwagner.github.io/zlinter/explorer/) (currently targeting 0.14.1 - also builds for master on a different branch but I’m not sure how to deploy both through GitHub Actions so sticking with 0.14.x as it’s more stable)\n\nIt’s plain JS and CSS (no bundling or polyfills or whatever web devs do these days) so mileage may vary on some browsers (I’ve only tested on desktop)\n\nMaybe once Zig is stable I will upstream something to the [astexplorer.net](http://astexplorer.net) project, OR maybe it’s not that useful and was more of a recreational programming exercise, which is also fine by me\n\nI will probably update it to provide more interpreted context about the nodes instead of the raw data… unless I get distracted by something else… \n\n \n18 Likes\n\n \nI noticed one minor thing, not sure if it is even noteworthy or worth any effort to “fix”, but while it tokenizes standard doc comments `///`, file-level documentation with `//!` doesn’t seem to be included.\n\nBut either way, very neat, and thanks for sharing!\n\n \n1 Like\n\n \n[Kurt](https://ziggit.dev/u/Kurt)\n3\n \nThanks for pointing this out!\n\nThis bug made me question whether all nodes (like tokens for comments) were being visited when walking the tree, and I think this catches another bug - `fn_ proto_*` aren’t included under `fn_decl`, which looks like a bug in ZLS where `fn_decl` is being treated like a proto, instead of first walking the `.fn_decl` and then the `fn_proto_*` in `data.lhs`/` node_and_node.@\"0\"`\n\nIt looks simple enough to fix, assuming this isn’t by design. I’ll take a better look tomorrow.\n\n \n1 Like\n\n \n[matklad](https://ziggit.dev/u/matklad)\n4\n \nJust wanted to say thanks for building this, the tool saved me quite a few headaches right now when dealing with assignments in our new Zig parser experiment: [#compiler > Zig Resilient Parser @](https://zsf.zulipchat.com/#narrow/channel/454360-compiler/topic/Zig.20Resilient.20Parser/near/622093883) \n\n \n2 Likes", "url": "https://wpnews.pro/news/zig-ast-explorer", "canonical_source": "https://ziggit.dev/t/zig-ast-explorer/11066#post_4", "published_at": "2026-09-06 15:52:22+00:00", "updated_at": "2026-09-07 01:59:45.246469+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Kurt Wagner", "Zlinter", "Zig", "matklad", "Zig Resilient Parser"], "alternates": {"html": "https://wpnews.pro/news/zig-ast-explorer", "markdown": "https://wpnews.pro/news/zig-ast-explorer.md", "text": "https://wpnews.pro/news/zig-ast-explorer.txt", "jsonld": "https://wpnews.pro/news/zig-ast-explorer.jsonld"}}