Model var as a pattern operator (#4720)

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
Geoff RomerandRichard Smith authored and GitHub committed 2025-01-17 17:51:34 +00:00
1 parent 6572da7314
commit 13434f0e8a
510 files changed
+11819 -3352

No files matched your search

+5
View File
@@ -47,6 +47,11 @@ class ArrayStack {
return llvm::ArrayRef(values_).slice(array_offsets_.back());
}
auto PeekArray() -> llvm::MutableArrayRef<ValueT> {
CARBON_CHECK(!array_offsets_.empty());
return llvm::MutableArrayRef(values_).slice(array_offsets_.back());
}
// Returns the array at a specific index.
auto PeekArrayAt(int index) const -> llvm::ArrayRef<ValueT> {
auto ref = llvm::ArrayRef(values_).slice(array_offsets_[index]);