doc/arch.md: say when numeric parameters are checked
The AST doesn't do detailed checking of numeric parameters. That's deferred to the separate validation step. Change-Id: I85aada7292fcc9757f9fd54e2d9a50ad1405ef9c Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29940 Reviewed-by: dan sinclair <dsinclair@chromium.org> Commit-Queue: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
f600d3aa9f
commit
6d6aed5460
17
docs/arch.md
17
docs/arch.md
|
@ -54,10 +54,21 @@ grammar in the naming of the parse methods.
|
||||||
|
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
After generation the AST will run an `IsValid` method which verifies that the
|
The Abstract Syntax Tree is a directed acyclic graph of nodes encoding
|
||||||
produced AST is structurally correct. This means that things like `if`
|
the structure of the WGSL program.
|
||||||
statements have a condition and body attached.
|
|
||||||
|
|
||||||
|
Many AST nodes have numeric parameters. For example, the ast::StrideDecoration
|
||||||
|
node has numeric stride parameter, which is a count of the number of bytes from
|
||||||
|
the start of one array element to the start of the next. The AST node itself
|
||||||
|
does not constrain the set of stride values that you can set, aside from storing
|
||||||
|
it as an unsigned integer.
|
||||||
|
|
||||||
|
After creating the AST for the whole WGSL program, Tint will run an `IsValid`
|
||||||
|
method which verifies that the produced AST is structurally correct. This
|
||||||
|
means that things like `if` statements have a condition and body attached.
|
||||||
|
|
||||||
|
A later phase of processing, Validation, will check properties such as whether
|
||||||
|
array strides satisfy all the requirements in the WGSL specification.
|
||||||
|
|
||||||
## Type Determiner
|
## Type Determiner
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue