aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-expr.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-10-17 17:51:15 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-10-19 19:32:47 +0100
commit8c4cf085d9afeada0e6c79c29904ee597c51bd25 (patch)
tree323ff05d3a99d2122705fe174992afc84f3acdb6 /gcc/rust/resolve/rust-ast-resolve-expr.h
parent8e2d13922fb4af8d00bdabd7af964e4f11b84259 (diff)
downloadgcc-8c4cf085d9afeada0e6c79c29904ee597c51bd25.zip
gcc-8c4cf085d9afeada0e6c79c29904ee597c51bd25.tar.gz
gcc-8c4cf085d9afeada0e6c79c29904ee597c51bd25.tar.bz2
Add name resolution for closures
This is the first pass at name resolution, it simply creates a new rib for the closure. We eventually need more checks here to enforce what things can be included within the closure.
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-expr.h')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-expr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-expr.h b/gcc/rust/resolve/rust-ast-resolve-expr.h
index a6f98ce..c11718e 100644
--- a/gcc/rust/resolve/rust-ast-resolve-expr.h
+++ b/gcc/rust/resolve/rust-ast-resolve-expr.h
@@ -75,6 +75,11 @@ public:
void visit (AST::RangeToExpr &expr) override;
void visit (AST::RangeFullExpr &expr) override;
void visit (AST::RangeFromToInclExpr &expr) override;
+ void visit (AST::ClosureExprInner &expr) override;
+ void visit (AST::ClosureExprInnerTyped &expr) override;
+
+protected:
+ void resolve_closure_param (AST::ClosureParam &param);
private:
ResolveExpr (const CanonicalPath &prefix,