aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-ast-fragment.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-ast-fragment.cc')
-rw-r--r--gcc/rust/ast/rust-ast-fragment.cc18
1 files changed, 4 insertions, 14 deletions
diff --git a/gcc/rust/ast/rust-ast-fragment.cc b/gcc/rust/ast/rust-ast-fragment.cc
index e5d0cce..22d2e63 100644
--- a/gcc/rust/ast/rust-ast-fragment.cc
+++ b/gcc/rust/ast/rust-ast-fragment.cc
@@ -23,8 +23,7 @@ namespace AST {
Fragment::Fragment (FragmentKind kind, std::vector<SingleASTNode> nodes,
std::vector<std::unique_ptr<AST::Token>> tokens)
- : kind (kind), nodes (std::move (nodes)), tokens (std::move (tokens)),
- overwrite (true)
+ : kind (kind), nodes (std::move (nodes)), tokens (std::move (tokens))
{}
Fragment::Fragment (Fragment const &other) : kind (other.get_kind ())
@@ -47,8 +46,6 @@ Fragment::operator= (Fragment const &other)
for (auto &t : other.tokens)
tokens.emplace_back (t->clone_token ());
- overwrite = other.overwrite;
-
return *this;
}
@@ -59,15 +56,14 @@ Fragment::create_error ()
}
Fragment::Fragment (std::vector<AST::SingleASTNode> nodes,
- std::vector<std::unique_ptr<AST::Token>> tokens,
- bool overwrite)
+ std::vector<std::unique_ptr<AST::Token>> tokens)
: kind (FragmentKind::Complete), nodes (std::move (nodes)),
- tokens (std::move (tokens)), overwrite (overwrite)
+ tokens (std::move (tokens))
{}
Fragment::Fragment (std::vector<AST::SingleASTNode> nodes,
std::unique_ptr<AST::Token> token)
- : kind (FragmentKind::Complete), nodes (std::move (nodes)), overwrite (true)
+ : kind (FragmentKind::Complete), nodes (std::move (nodes))
{
tokens.emplace_back (std::move (token));
}
@@ -103,12 +99,6 @@ Fragment::should_expand () const
}
bool
-Fragment::should_overwrite () const
-{
- return overwrite;
-}
-
-bool
Fragment::is_expression_fragment () const
{
return is_single_fragment_of_kind (SingleASTNode::NodeType::EXPRESSION);