diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 21:38:19 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 21:44:31 +0100 |
commit | 7912189ec304b28c4df0030b5282cf3d21074154 (patch) | |
tree | 03a0a1b128439fdefbd1d012b392995ca8a6e264 /src/parser/token_set.rs | |
parent | d1400e95d7ad701fcba1191cb00968c2eae8b394 (diff) |
reorganize
Diffstat (limited to 'src/parser/token_set.rs')
-rw-r--r-- | src/parser/token_set.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/parser/token_set.rs b/src/parser/token_set.rs deleted file mode 100644 index a800f200d..000000000 --- a/src/parser/token_set.rs +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | use SyntaxKind; | ||
2 | |||
3 | pub(crate) struct TokenSet { | ||
4 | pub tokens: &'static [SyntaxKind], | ||
5 | } | ||
6 | |||
7 | impl TokenSet { | ||
8 | pub fn contains(&self, kind: SyntaxKind) -> bool { | ||
9 | self.tokens.contains(&kind) | ||
10 | } | ||
11 | } | ||
12 | |||
13 | #[macro_export] | ||
14 | macro_rules! token_set { | ||
15 | ($($t:ident),*) => { | ||
16 | TokenSet { | ||
17 | tokens: &[$($t),*], | ||
18 | } | ||
19 | }; | ||
20 | |||
21 | ($($t:ident),* ,) => { | ||
22 | token_set!($($t),*) | ||
23 | }; | ||
24 | } | ||