mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-20 00:36:39 +00:00
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:
1 parent
ae5d1efd13
commit
2ec4bab59b
12 files changed
+958
-430
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user