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

Add a skeleton for directives that reports nice errors #6352

Conversation

ErichDonGubler
Copy link
Member

@ErichDonGubler ErichDonGubler commented Oct 1, 2024

Connections

Dependency of #6148.

May conflict with changes in #5701. If this merges first, I'll resolve conflicts there.

Lays groundwork for:

Description

Recommended review experience is commit-by-commit. Each individual commit should pass CI!

There's not a parse path for any directives, let alone what I'm working on with the diagnostic(…) directive in #6148. It turns out that adding the starting point with some diagnostics is enough code that a PR checkpoint sounds wise. As a bonus, this can also serve as the base for a full solution to #5476 and #6350.

Testing

Tests will be added before this PR comes out of draft, to ensure that the error cases added here are covered.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@ErichDonGubler ErichDonGubler force-pushed the erichdongubler/push-nzmmrzzmyvqu branch 2 times, most recently from 544a07b to 1f3a0ef Compare October 18, 2024 01:51
@ErichDonGubler ErichDonGubler marked this pull request as ready for review October 18, 2024 01:53
@ErichDonGubler ErichDonGubler requested review from a team as code owners October 18, 2024 01:53
@ErichDonGubler ErichDonGubler force-pushed the erichdongubler/push-nzmmrzzmyvqu branch 2 times, most recently from be9b1ab to 18907ee Compare October 18, 2024 02:30
CHANGELOG.md Outdated Show resolved Hide resolved
naga/src/front/wgsl/parse/directive.rs Show resolved Hide resolved
1. Break out `word_as_ident*` helpers to keep validation of identifiers
   DRY.
2. Add `peek_*` variant of `Lexer::next_ident_with_span`.

This will be consumed immediately in the subsequent commit.
@ErichDonGubler ErichDonGubler enabled auto-merge (rebase) October 18, 2024 16:41
@teoxoy

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: refactor Making existing function faster or nicer
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants