diff options
author | Aleksey Kladov <[email protected]> | 2018-07-30 12:08:06 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-30 12:08:06 +0100 |
commit | 1edb58a802f183f79dc2c4bc15921394ef8abb31 (patch) | |
tree | 24114171c61a9f433b9a54008057fa0297f91302 /src/parser/grammar | |
parent | 6983091d6d255bcfd17c4f8c14015d8abc77928d (diff) |
reformat
Diffstat (limited to 'src/parser/grammar')
-rw-r--r-- | src/parser/grammar/items/mod.rs | 9 | ||||
-rw-r--r-- | src/parser/grammar/mod.rs | 11 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/parser/grammar/items/mod.rs b/src/parser/grammar/items/mod.rs index 1fe646652..5d8d57a80 100644 --- a/src/parser/grammar/items/mod.rs +++ b/src/parser/grammar/items/mod.rs | |||
@@ -1,9 +1,9 @@ | |||
1 | use super::*; | 1 | use super::*; |
2 | 2 | ||
3 | mod structs; | ||
4 | mod use_item; | ||
5 | mod consts; | 3 | mod consts; |
4 | mod structs; | ||
6 | mod traits; | 5 | mod traits; |
6 | mod use_item; | ||
7 | 7 | ||
8 | pub(super) fn mod_contents(p: &mut Parser, stop_on_r_curly: bool) { | 8 | pub(super) fn mod_contents(p: &mut Parser, stop_on_r_curly: bool) { |
9 | attributes::inner_attributes(p); | 9 | attributes::inner_attributes(p); |
@@ -12,9 +12,8 @@ pub(super) fn mod_contents(p: &mut Parser, stop_on_r_curly: bool) { | |||
12 | } | 12 | } |
13 | } | 13 | } |
14 | 14 | ||
15 | pub(super) const ITEM_FIRST: TokenSet = token_set![ | 15 | pub(super) const ITEM_FIRST: TokenSet = |
16 | EXTERN_KW, MOD_KW, USE_KW, STRUCT_KW, ENUM_KW, FN_KW, PUB_KW, POUND | 16 | token_set![EXTERN_KW, MOD_KW, USE_KW, STRUCT_KW, ENUM_KW, FN_KW, PUB_KW, POUND]; |
17 | ]; | ||
18 | 17 | ||
19 | fn item(p: &mut Parser) { | 18 | fn item(p: &mut Parser) { |
20 | let item = p.start(); | 19 | let item = p.start(); |
diff --git a/src/parser/grammar/mod.rs b/src/parser/grammar/mod.rs index 085e62d56..e24f1055e 100644 --- a/src/parser/grammar/mod.rs +++ b/src/parser/grammar/mod.rs | |||
@@ -21,20 +21,17 @@ | |||
21 | //! After adding a new inline-test, run `cargo collect-tests` to extract | 21 | //! After adding a new inline-test, run `cargo collect-tests` to extract |
22 | //! it as a standalone text-fixture into `tests/data/parser/inline`, and | 22 | //! it as a standalone text-fixture into `tests/data/parser/inline`, and |
23 | //! run `cargo test` once to create the "gold" value. | 23 | //! run `cargo test` once to create the "gold" value. |
24 | mod items; | ||
25 | mod attributes; | 24 | mod attributes; |
26 | mod expressions; | 25 | mod expressions; |
27 | mod types; | 26 | mod items; |
28 | mod patterns; | ||
29 | mod paths; | 27 | mod paths; |
28 | mod patterns; | ||
30 | mod type_params; | 29 | mod type_params; |
30 | mod types; | ||
31 | 31 | ||
32 | use { | 32 | use { |
33 | parser::{parser::Parser, token_set::TokenSet}, | ||
33 | SyntaxKind::{self, *}, | 34 | SyntaxKind::{self, *}, |
34 | parser::{ | ||
35 | parser::Parser, | ||
36 | token_set::TokenSet | ||
37 | } | ||
38 | }; | 35 | }; |
39 | 36 | ||
40 | pub(crate) fn file(p: &mut Parser) { | 37 | pub(crate) fn file(p: &mut Parser) { |