Skip to content

Commit c7edea2

Browse files
committed
Disallow empty dimension
1 parent c2be1ab commit c7edea2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Tools/cases_generator/parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ def dimension(self) -> Dimension | None:
261261
while (tkn := self.peek()) and tkn.kind != lx.RBRACKET:
262262
tokens.append(tkn)
263263
self.next()
264+
if not tokens:
265+
return None
264266
return Dimension(lx.to_text(tokens).strip())
265267

266268
@contextual

0 commit comments

Comments
 (0)