mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-24 13:12:43 +00:00
Eliminate run-time errors from PatternMatch (#1126)
This commit is contained in:
1 parent
9384077abd
commit
93842ad878
5 files changed
+59
-10
No files matched your search
@@ -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