aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-ast.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-02-17 13:23:18 +0000
committerPhilip Herron <philip.herron@embecosm.com>2022-02-17 13:28:25 +0000
commit4c70d7ec770d226bf9ad59b4f03897f6fb10df15 (patch)
tree8b7516086e531504e04ad03420af4668be0b29ee /gcc/rust/ast/rust-ast.h
parent19c5dde80f28c67f657775f770922783faff4b89 (diff)
downloadgcc-4c70d7ec770d226bf9ad59b4f03897f6fb10df15.zip
gcc-4c70d7ec770d226bf9ad59b4f03897f6fb10df15.tar.gz
gcc-4c70d7ec770d226bf9ad59b4f03897f6fb10df15.tar.bz2
Support block expressions within macros
When we parse DelimTokenTree's the delimiter's are synthesised when we ask for the token stream which results in tokens lacking location info. This removes the hack by adding the actual tokens from the lexer into the stream.
Diffstat (limited to 'gcc/rust/ast/rust-ast.h')
-rw-r--r--gcc/rust/ast/rust-ast.h30
1 files changed, 0 insertions, 30 deletions
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