Skip to content

Conversation

@dneto0
Copy link
Contributor

@dneto0 dneto0 commented Nov 8, 2022

Make it the same as in the ordinary kind of expression:

  • unary & and unary * are lower precedence than [] indexing and .member selection.

Fixes: #3530

Make it the same as in the ordinary kind of expression:
- unary & and unary * are lower precedence than [] indexing and .member selection.

Fixes: gpuweb#3530
@dneto0 dneto0 added the wgsl WebGPU Shading Language Issues label Nov 8, 2022
@dneto0 dneto0 added this to the V1.0 milestone Nov 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

Previews, as seen when this build job started (539e0d7):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

@dneto0 dneto0 added the wgsl resolved Resolved - waiting for a change to the WGSL specification label Nov 8, 2022
@dneto0
Copy link
Contributor Author

dneto0 commented Nov 8, 2022

I was also tempted to do two cleanups:

  • inline "singular_expression" into its only use.
  • rename core_lhs_expression to primary_lhs_expression

That way we get a nice parallel structure between lhs_expression and singular_expression

But I avoided that, to keep this PR small.

@mehmetoguzderin
Copy link
Member

@dneto0 FTTB it'll also make easier to sync style PR but I think those are good changes to include eventually

Copy link
Contributor

@alan-baker alan-baker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dneto0 dneto0 merged commit a291e74 into gpuweb:main Nov 9, 2022
@dneto0 dneto0 deleted the issue-3530-precedence branch April 13, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wgsl resolved Resolved - waiting for a change to the WGSL specification wgsl WebGPU Shading Language Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wgsl: grammar for LHS is ambiguous about grouping its subexpressions, affects type checking

3 participants