mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 17:38:14 +00:00
Model var as a pattern operator (#4720)
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
1 parent
6572da7314
commit
13434f0e8a
510 files changed
+11819
-3352
No files matched your search
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user