Support lexing and parsing positional params (#7651)

This implements lexing and parsing positional parameters such as `$0`.
This commit is contained in:
Özgür T. Önsoy
2026-09-03 19:06:20 +00:00
committed by GitHub
parent 27849b385c
commit 5474347d7d
14 changed files with 282 additions and 8 deletions
+2 -1
View File
@@ -93,7 +93,8 @@ auto TokenizedBuffer::GetTokenText(TokenIndex token) const -> llvm::StringRef {
// Refer back to the source text to avoid needing to reconstruct the
// spelling from the size.
if (token_info.kind().is_sized_type_literal()) {
if (token_info.kind().is_sized_type_literal() ||
token_info.kind().is_dollar_int_literal()) {
llvm::StringRef suffix = source_->text()
.substr(token_info.byte_offset() + 1)
.take_while(IsDecimalDigit);