d39aec940d
Previously, our AST structures would include a "sizeCount" for arrays, which indicated the number of AST nodes associated with array dimensions. Since GLSL only supports a single array dimension, this field has been replaced with "isArray," a boolean indicating whether we have a single AST node for array size. This allowed many array-size based looping constructs to be replaced with simpler non-looping equivalents. This change flushed out a few places where the parser was not actually enforcing its promised maximum array-dimensionality. Also found some duplicated code in variable-declaration parsing, related to parsing array-sizes and initializer expressions. This has been de-duplicated by using a lambda. (This change was likely why this CL was not net-negative for LOC, but it's simpler and cleaner.) Change-Id: I7abed732d3a296edf02c0ec9813fceb5aae4a9a0 Bug: skia:11026 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340656 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com>
5 lines
86 B
GLSL
5 lines
86 B
GLSL
### Compilation failed:
|
|
|
|
error: 1: multi-dimensional arrays are not supported
|
|
1 error
|