Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple declarations in a single statement #159

Merged
merged 4 commits into from
Jun 13, 2024

Commits on Jun 8, 2024

  1. Support multiple declarations in a single statement

    A new statement node called `DeclStmtNode` has been introduced to hold
    multiple declarations. The AST nodes backed by non-terminals that take
    `decl` now accept a `DeclStmtNode` instead of a `DeclNode`. These nodes
    include `LoopInitNode` and `CompoundStmtNode`; other nodes remain
    unaffected.
    Since `DeclStmtNode` is simply a sequence of `DeclNode`s, the `Visit`
    functions will visit each `DeclNode` it holds.
    Lai-YT committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    af352f3 View commit details
    Browse the repository at this point in the history
  2. Fix use-after-move

    Objects are placed in a valid but unspecified state after being
    moved-from.
    Lai-YT committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    544bf88 View commit details
    Browse the repository at this point in the history
  3. Inline type alias & rename data member

    Since an item of a compound statement is no longer an `std::variant`, we
    no longer use a type alias to simplify the type. Additionally, the data
    member has been renamed to remove the word `item`, which is a technical
    term used during parsing.
    Lai-YT committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    4430476 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c7f2fe4 View commit details
    Browse the repository at this point in the history