Skip to content

Commit d286ece

Browse files
committed
Fix template list discovery algorithm: missing continue
At the end of the first 'if' clause, where '<' is matched, insert a 'Start the next iteration of the loop.' Otherwise execution reaches the 'advance token' at the bottom of the loop. For example, in parsing: X < Y > The '>' would be consumed too early, and template list discovery gets the wrong answer. Fixes: #5246
1 parent a41245b commit d286ece

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

wgsl/index.bs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,6 +1597,7 @@ Let |TemplateList| be a record type containing:
15971597
Skip over the `'='` (U+003D) code point so a later step does not mistake it for an assignment.
15981598
* Pop the top entry from the |Pending| stack.
15991599
* Advance |CurrentPosition| past this code point, and start the next iteration of the loop.
1600+
* Start the next iteration of the loop.
16001601
* If `'>'` (U+003E) appears at |CurrentPosition| then:
16011602
* Note: This code point is a candidate for being the end of a template list.
16021603
* If |Pending| is not empty, then let |T| be its top entry, and if |T|.|depth| equals |NestingDepth| then:

0 commit comments

Comments
 (0)