Fix handling of repeated tuple indexing. (#4733)

Per [the
design](https://docs.carbon-lang.dev/docs/design/lexical_conventions/),
`x.1.2` should lex as `(x.1).2`, not as `x.(1.2)`.
This commit is contained in:
Richard Smith authored and GitHub committed 2024-12-21 06:57:14 +00:00
1 parent 266fd6aa75
commit 28602a87c2
10 files changed
+191 -36

No files matched your search

+3 -1
View File
@@ -337,7 +337,9 @@ TEST_F(LexerTest, SplitsNumericLiteralsProperly) {
// newline
{.kind = TokenKind::RealLiteral, .text = "9.0"},
{.kind = TokenKind::Period},
{.kind = TokenKind::RealLiteral, .text = "9.5"},
{.kind = TokenKind::IntLiteral, .text = "9"},
{.kind = TokenKind::Period},
{.kind = TokenKind::IntLiteral, .text = "5"},
// newline
{.kind = TokenKind::Error, .text = "10.foo"},
// newline