-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[wgsl-in] Implement template list discovery and handle all type resolution in the lowerer #8386
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
Open
teoxoy
wants to merge
33
commits into
gfx-rs:trunk
Choose a base branch
from
teoxoy:tld
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,751
−3,057
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
42338ff
add `optionally_typed_ident` fn
teoxoy 4adede5
[wgsl] rename `type_decl` to `type_specifier`
teoxoy 54fe3ca
rename `assignment_statement` to `variable_updating_statement`
teoxoy e99eb01
rename `general_expression` to `expression`
teoxoy ed6a032
remove `next_scalar_generic`
teoxoy 75fbca1
remove `peek_ident_with_span`
teoxoy 47108f6
update `lhs_expression` to be in line with the spec
teoxoy fe63d07
rename `postfix` to `component_or_swizzle_specifier`
teoxoy 086c0e4
remove `lexer.clone()`
teoxoy 16c2777
rename `function_statement` to `func_call_statement`
teoxoy 527cf31
rename `function_call_or_assignment_statement` to `func_call_or_varia…
teoxoy 68ca96d
use `lexer.next()` instead of `peek()` for most statements
teoxoy 97c58d0
flatten match
teoxoy 35799e6
add function that parses variable, value, func call and variable upda…
teoxoy 1149d02
use `lexer.skip()` in one more place
teoxoy f33897d
rename `Lexer` `skip` to `next_if`
teoxoy bf6be2e
use `lexer.next()` in `primary_expression`
teoxoy afcdc3c
rename `function_call` to `call_expression`
teoxoy f827139
use `lexer.next()` in `unary_expression`
teoxoy 0e65fa3
avoid recursing into `unary_expression`
teoxoy 6ae7230
remove `Clone` derive from the `Lexer`
teoxoy 0c6ff52
add `Lexer::span_with_start`
teoxoy c12bf68
add `TemplateArgsStart` & `TemplateArgsEnd` tokens
teoxoy 393213b
handle `var` decl template list in the lowerer
teoxoy f52a0ad
handle `bitcast` and construction expressions in the lowerer
teoxoy 081dbe1
handle all type resolution in the lowerer
teoxoy 5262323
add `shadowing_predeclared_types` test
teoxoy 4c87309
add `test_template_list` test
teoxoy 7fe5aa3
document `consume_tokens`
teoxoy 4ebbc67
implement template list discovery
teoxoy 96a378e
[wgsl] update reserved list to latest CR
teoxoy 92e95ff
adjust GLSL snapshots
teoxoy 13a9c1b
[wgsl-out] avoid shadowing built-ins
teoxoy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
lhs_expressionis spec jargon. Isn't there something we could say here that would be more readily recognized by WGSL programmers? "expression to be assigned to"? "destination for assignment"?(Spec jargon is fine when we need to be precise and there's nothing better.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"destination for assignment"/"assignment destination" sound good.
It's also used by increment/decrement statements but it's probably ok?