aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/syntax_kind
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-04-03 14:38:42 +0100
committerAleksey Kladov <[email protected]>2020-04-03 15:12:38 +0100
commitda8eb29a2f70a58122903bf087bd6c1d0fbd6d3f (patch)
treeac21306c7bf9dc816f4b0e9b50322f57256eddfa /crates/ra_parser/src/syntax_kind
parent0e46ed8420469741d718ac223fad1088c151b497 (diff)
Macro patterns are not confused with expressions.
We treat macro calls as expressions (there's appropriate Into impl), which causes problem if there's expresison and non-expression macro in the same node (like in the match arm). We fix this problem by nesting macor patterns into another node (the same way we nest path into PathExpr or PathPat). Ideally, we probably should add a similar nesting for macro expressions, but that needs some careful thinking about macros in blocks: `{ am_i_expression!() }`.
Diffstat (limited to 'crates/ra_parser/src/syntax_kind')
-rw-r--r--crates/ra_parser/src/syntax_kind/generated.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs
index dfc30d727..4c16cf1cd 100644
--- a/crates/ra_parser/src/syntax_kind/generated.rs
+++ b/crates/ra_parser/src/syntax_kind/generated.rs
@@ -167,6 +167,7 @@ pub enum SyntaxKind {
167 SLICE_PAT, 167 SLICE_PAT,
168 RANGE_PAT, 168 RANGE_PAT,
169 LITERAL_PAT, 169 LITERAL_PAT,
170 MACRO_PAT,
170 TUPLE_EXPR, 171 TUPLE_EXPR,
171 ARRAY_EXPR, 172 ARRAY_EXPR,
172 PAREN_EXPR, 173 PAREN_EXPR,