Lex and parse support for ... statements and expand. (#7832)

No support for `each` yet, but this should be enough that we can try out
an implementation approach supporting expanding a statement across
elements of a tuple without building "real" variadics.

Assisted-by: Claude via Antigravity
This commit is contained in:
Richard Smith authored and GitHub committed 2026-10-05 22:23:12 +00:00
1 parent ae5d1efd13
commit 2ec4bab59b
12 files changed
+958 -430

No files matched your search

+2
View File
@@ -149,6 +149,7 @@ auto PrecedenceGroup::ForLeading(Lex::TokenKind kind)
switch (kind) {
case Lex::TokenKind::Star:
case Lex::TokenKind::Amp:
case Lex::TokenKind::Expand:
return PrecedenceGroup(TermPrefix);
case Lex::TokenKind::Not:
@@ -249,6 +250,7 @@ auto PrecedenceGroup::ForTrailing(Lex::TokenKind kind, bool infix)
// Prefix-only operators.
case Lex::TokenKind::Const:
case Lex::TokenKind::Expand:
case Lex::TokenKind::MinusMinus:
case Lex::TokenKind::Not:
case Lex::TokenKind::Partial: