aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2021-01-10 14:30:39 +0800
committerSimplyTheOther <simplytheother@gmail.com>2021-01-10 14:30:39 +0800
commitb247c0d5aadf6eb7323641ffbcf7cc67bedd2c52 (patch)
tree3a4d3a0b0569d28f679ecbc74928125034d50f4f /gcc/rust/ast
parentee85db852a5a819e559ab00e7a382a34e925447a (diff)
parent0f42a240e53e932de0ae4799d54fe0bd15d06047 (diff)
downloadgcc-b247c0d5aadf6eb7323641ffbcf7cc67bedd2c52.zip
gcc-b247c0d5aadf6eb7323641ffbcf7cc67bedd2c52.tar.gz
gcc-b247c0d5aadf6eb7323641ffbcf7cc67bedd2c52.tar.bz2
Merge branch 'master' of https://github.com/redbrain/gccrs
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r--gcc/rust/ast/rust-expr.h2
-rw-r--r--gcc/rust/ast/rust-stmt.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index eee654b..cfb4228 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -2839,6 +2839,8 @@ public:
}
}
+ size_t num_statements () const { return statements.size (); }
+
// TODO: this mutable getter seems really dodgy. Think up better way.
const std::vector<Attribute> &get_inner_attrs () const { return inner_attrs; }
std::vector<Attribute> &get_inner_attrs () { return inner_attrs; }
diff --git a/gcc/rust/ast/rust-stmt.h b/gcc/rust/ast/rust-stmt.h
index c2ce387..c840112 100644
--- a/gcc/rust/ast/rust-stmt.h
+++ b/gcc/rust/ast/rust-stmt.h
@@ -184,6 +184,8 @@ class ExprStmt : public Stmt
Location locus;
public:
+ Location get_locus_slow () const final override { return get_locus (); }
+
Location get_locus () const { return locus; }
protected: