Julia → WebAssembly GC · no Julia runtime

Julia's parser, running in your browser

The JuliaSyntax parser that ships with Julia 1.13 (Base.JuliaSyntax), compiled from Julia to WasmGC with WasmCodegen. Every edit is lexed and parsed in WebAssembly, error recovery included; the page reads back the parser's raw output, tokens and tree ranges, and builds the green tree from it as build_tree does.

Source

Parse–
Bytes–
Nodes–
Tokens–

As the parser sees it hover the tree to find a node


      

Diagnostics

    Loading the parser…

    Green tree kind, byte range; trivia dimmed

      The whole parser

      JuliaSyntax's lexer and recursive-descent parser, unchanged: 425 Julia functions in 718 KB of WebAssembly. Its tables (kind names, operator sets) were built when Julia loaded and are serialized into the module: 1215 objects.

      What WebAssembly lacks

      The lexer asks libutf8proc about Unicode characters, and numbers go through C's strtod. Here the Unicode tables come from the native libraries at build time and floats are parsed by Parsers.jl, compiled into the module with the parser.

      Checked against Julia

      On 308 KB of Julia source, Base files included, the module's output matches native JuliaSyntax node for node: kinds, spans, flags and diagnostics.