aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-02-03 16:45:27 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-02-06 15:45:51 +0000
commit34a39466b2adb9684a1737c6ea4915e0194c26bf (patch)
treedf65323e28a0b4507431969d62ac932fc2efb2d3 /gcc/rust/backend/rust-compile-expr.h
parent59a8fa1a80c3b2c6520c627a6bf200274732d395 (diff)
downloadgcc-34a39466b2adb9684a1737c6ea4915e0194c26bf.zip
gcc-34a39466b2adb9684a1737c6ea4915e0194c26bf.tar.gz
gcc-34a39466b2adb9684a1737c6ea4915e0194c26bf.tar.bz2
Add in support to compile Methods and MethodCallExpr
There is more work to be done here with adjustments to the self argument such as borrows and mutability checking. Method resolution is basic, for now there is code to scan for all possible matches but traits are not supported at the moment so this resolves quite simply for now. Fixes #191 #112
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
-rw-r--r--gcc/rust/backend/rust-compile-expr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h
index fad5ce0..b823d29 100644
--- a/gcc/rust/backend/rust-compile-expr.h
+++ b/gcc/rust/backend/rust-compile-expr.h
@@ -99,6 +99,8 @@ public:
void visit (HIR::CallExpr &expr);
+ void visit (HIR::MethodCallExpr &expr);
+
void visit (HIR::IdentifierExpr &expr)
{
// need to look up the reference for this identifier