aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-31 07:33:11 +0000
committerAleksey Kladov <[email protected]>2019-01-31 20:23:30 +0000
commit82cf0185c36faf81dbdf7e64843bdfc5b4df1b21 (patch)
tree32a8fed662f5de9086fe2c12c44581e394a2cb0d
parent3bd4560d6eb6404f05c2c99a5755b86e9e896eb9 (diff)
add repeats to ast
-rw-r--r--crates/ra_hir/src/macros/mbe.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/ra_hir/src/macros/mbe.rs b/crates/ra_hir/src/macros/mbe.rs
index 2d7965b62..1408ed511 100644
--- a/crates/ra_hir/src/macros/mbe.rs
+++ b/crates/ra_hir/src/macros/mbe.rs
@@ -14,6 +14,7 @@ struct Rule {
14enum TokenTree { 14enum TokenTree {
15 Leaf(Leaf), 15 Leaf(Leaf),
16 Subtree(Subtree), 16 Subtree(Subtree),
17 Repeat(Repeat),
17} 18}
18 19
19enum Leaf { 20enum Leaf {
@@ -35,6 +36,17 @@ enum Delimiter {
35 None, 36 None,
36} 37}
37 38
39struct Repeat {
40 subtree: Subtree,
41 kind: RepeatKind,
42}
43
44enum RepeatKind {
45 ZeroOrMore,
46 OneOrMore,
47 ZeroOrOne,
48}
49
38struct Literal { 50struct Literal {
39 text: SmolStr, 51 text: SmolStr,
40} 52}