mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 09:06:21 +01:00
Eliminate run-time errors from PatternMatch (#1126)
This commit is contained in:
@@ -84,6 +84,12 @@ class Pattern : public AstNode {
|
||||
std::optional<Nonnull<const Value*>> value_;
|
||||
};
|
||||
|
||||
class BindingPattern;
|
||||
|
||||
// Returns all `BindingPattern`s in the AST subtree rooted at `pattern`.
|
||||
auto GetBindings(const Pattern& pattern)
|
||||
-> std::vector<Nonnull<const BindingPattern*>>;
|
||||
|
||||
// A pattern consisting of the `auto` keyword.
|
||||
class AutoPattern : public Pattern {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user