diff options
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r-- | gcc/rust/ast/rust-ast-full-test.cc | 15 | ||||
-rw-r--r-- | gcc/rust/ast/rust-ast.h | 30 |
2 files changed, 0 insertions, 45 deletions
diff --git a/gcc/rust/ast/rust-ast-full-test.cc b/gcc/rust/ast/rust-ast-full-test.cc index ee7c407..3a1e295 100644 --- a/gcc/rust/ast/rust-ast-full-test.cc +++ b/gcc/rust/ast/rust-ast-full-test.cc @@ -4387,14 +4387,6 @@ std::vector<std::unique_ptr<Token> > DelimTokenTree::to_token_stream () const { std::vector<std::unique_ptr<Token> > tokens; - - // simulate presence of delimiters - const_TokenPtr left_paren - = Rust::Token::make (left_delim_type_tok_token_id (delim_type), - Linemap::unknown_location ()); - tokens.push_back ( - std::unique_ptr<Token> (new Token (std::move (left_paren)))); - for (const auto &tree : token_trees) { std::vector<std::unique_ptr<Token> > stream = tree->to_token_stream (); @@ -4403,14 +4395,7 @@ DelimTokenTree::to_token_stream () const std::make_move_iterator (stream.end ())); } - const_TokenPtr right_paren - = Rust::Token::make (right_delim_type_tok_token_id (delim_type), - Linemap::unknown_location ()); - tokens.push_back ( - std::unique_ptr<Token> (new Token (std::move (right_paren)))); - tokens.shrink_to_fit (); - return tokens; } diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 8411f65..3e7faf5 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -778,36 +778,6 @@ public: } DelimType get_delim_type () const { return delim_type; } - - static TokenId left_delim_type_tok_token_id (DelimType delim_type) - { - switch (delim_type) - { - case PARENS: - return LEFT_PAREN; - case SQUARE: - return LEFT_SQUARE; - case CURLY: - return LEFT_CURLY; - default: - gcc_unreachable (); - } - } - - static TokenId right_delim_type_tok_token_id (DelimType delim_type) - { - switch (delim_type) - { - case PARENS: - return RIGHT_PAREN; - case SQUARE: - return RIGHT_SQUARE; - case CURLY: - return RIGHT_CURLY; - default: - gcc_unreachable (); - } - } }; /* Forward decl - definition moved to rust-expr.h as it requires LiteralExpr to |