mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Model var as a pattern operator (#4720)
Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
6572da7314
commit
13434f0e8a
@@ -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