Sitelet https://github.com/gpuweb/gpuweb/issues/716
Skip to content

Grammar missing ability to have just a function call. #716

Description

@dj2

Currently there is no way in the grammar to have a function call by itself on a line, it is not in the list of statements.

For example, the following will fail to parse:

fn a() -> void {
  return;
}

fn b() -> void {
  a();
  return;
}

The statements list needs to be extended to have something like:

 | IDENT paren_rhs_stmt

This means we'll have to do lookahead at in the statement parsing because you can't tell if this is a call or an assignment straight away.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wgslWebGPU Shading Language Issues

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions