Skip to content

rewrite the stage2 parser to be recursive and adhere to the official grammar #1729

Closed
@andrewrk

Description

@andrewrk

I'm creating this issue in case any contributors want to take a stab at it.

Now that @Hejsil created the formal grammar, and now that we know recursion is OK, there are 2 things that need to happen to std/zig/parse.zig:

  • rewrite it in recursive style so that it is easier to maintain
  • adhere to the formal grammar

It's a fairly large project, that will probably take a couple weeks for someone who isn't already familiar with the parser to do. You can look at src/parser.cpp and almost directly port the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.frontendTokenization, parsing, AstGen, Sema, and Liveness.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions