diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 21:16:07 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 21:16:07 +0100 |
commit | d1400e95d7ad701fcba1191cb00968c2eae8b394 (patch) | |
tree | 8085d65e9b226592d334b117036cb7725a5d710f /src | |
parent | 6953049e5f67dcc940cc4edc228c1be13a4624d1 (diff) |
renames
Diffstat (limited to 'src')
-rw-r--r-- | src/parser/grammar/expressions.rs | 2 | ||||
-rw-r--r-- | src/parser/grammar/items/mod.rs | 6 | ||||
-rw-r--r-- | src/parser/grammar/items/structs.rs | 4 | ||||
-rw-r--r-- | src/parser/grammar/items/traits.rs | 4 | ||||
-rw-r--r-- | src/parser/grammar/params.rs | 4 | ||||
-rw-r--r-- | src/parser/grammar/paths.rs | 4 | ||||
-rw-r--r-- | src/parser/grammar/type_args.rs | 2 | ||||
-rw-r--r-- | src/parser/grammar/type_params.rs | 2 | ||||
-rw-r--r-- | src/parser/grammar/types.rs | 4 |
9 files changed, 16 insertions, 16 deletions
diff --git a/src/parser/grammar/expressions.rs b/src/parser/grammar/expressions.rs index 09b351f31..06f9105c6 100644 --- a/src/parser/grammar/expressions.rs +++ b/src/parser/grammar/expressions.rs | |||
@@ -172,7 +172,7 @@ fn tuple_expr(p: &mut Parser) -> CompletedMarker { | |||
172 | fn lambda_expr(p: &mut Parser) -> CompletedMarker { | 172 | fn lambda_expr(p: &mut Parser) -> CompletedMarker { |
173 | assert!(p.at(PIPE)); | 173 | assert!(p.at(PIPE)); |
174 | let m = p.start(); | 174 | let m = p.start(); |
175 | params::list_opt_types(p); | 175 | params::param_list_opt_types(p); |
176 | if fn_ret_type(p) { | 176 | if fn_ret_type(p) { |
177 | block(p); | 177 | block(p); |
178 | } else { | 178 | } else { |
diff --git a/src/parser/grammar/items/mod.rs b/src/parser/grammar/items/mod.rs index 8c2704be5..d5f75f13d 100644 --- a/src/parser/grammar/items/mod.rs +++ b/src/parser/grammar/items/mod.rs | |||
@@ -236,10 +236,10 @@ fn fn_item(p: &mut Parser) { | |||
236 | name(p); | 236 | name(p); |
237 | // test fn_item_type_params | 237 | // test fn_item_type_params |
238 | // fn foo<T: Clone + Copy>(){} | 238 | // fn foo<T: Clone + Copy>(){} |
239 | type_params::list(p); | 239 | type_params::type_param_list(p); |
240 | 240 | ||
241 | if p.at(L_PAREN) { | 241 | if p.at(L_PAREN) { |
242 | params::list(p); | 242 | params::param_list(p); |
243 | } else { | 243 | } else { |
244 | p.error("expected function arguments"); | 244 | p.error("expected function arguments"); |
245 | } | 245 | } |
@@ -265,7 +265,7 @@ fn type_item(p: &mut Parser) { | |||
265 | 265 | ||
266 | // test type_item_type_params | 266 | // test type_item_type_params |
267 | // type Result<T> = (); | 267 | // type Result<T> = (); |
268 | type_params::list(p); | 268 | type_params::type_param_list(p); |
269 | 269 | ||
270 | // test type_item_where_clause | 270 | // test type_item_where_clause |
271 | // type Foo where Foo: Copy = (); | 271 | // type Foo where Foo: Copy = (); |
diff --git a/src/parser/grammar/items/structs.rs b/src/parser/grammar/items/structs.rs index c72b50808..7ced542a4 100644 --- a/src/parser/grammar/items/structs.rs +++ b/src/parser/grammar/items/structs.rs | |||
@@ -5,7 +5,7 @@ pub(super) fn struct_item(p: &mut Parser) { | |||
5 | p.bump(); | 5 | p.bump(); |
6 | 6 | ||
7 | name(p); | 7 | name(p); |
8 | type_params::list(p); | 8 | type_params::type_param_list(p); |
9 | match p.current() { | 9 | match p.current() { |
10 | WHERE_KW => { | 10 | WHERE_KW => { |
11 | type_params::where_clause(p); | 11 | type_params::where_clause(p); |
@@ -42,7 +42,7 @@ pub(super) fn enum_item(p: &mut Parser) { | |||
42 | assert!(p.at(ENUM_KW)); | 42 | assert!(p.at(ENUM_KW)); |
43 | p.bump(); | 43 | p.bump(); |
44 | name(p); | 44 | name(p); |
45 | type_params::list(p); | 45 | type_params::type_param_list(p); |
46 | type_params::where_clause(p); | 46 | type_params::where_clause(p); |
47 | if p.expect(L_CURLY) { | 47 | if p.expect(L_CURLY) { |
48 | while !p.at(EOF) && !p.at(R_CURLY) { | 48 | while !p.at(EOF) && !p.at(R_CURLY) { |
diff --git a/src/parser/grammar/items/traits.rs b/src/parser/grammar/items/traits.rs index 60158fe41..bda13e565 100644 --- a/src/parser/grammar/items/traits.rs +++ b/src/parser/grammar/items/traits.rs | |||
@@ -6,7 +6,7 @@ pub(super) fn trait_item(p: &mut Parser) { | |||
6 | assert!(p.at(TRAIT_KW)); | 6 | assert!(p.at(TRAIT_KW)); |
7 | p.bump(); | 7 | p.bump(); |
8 | name(p); | 8 | name(p); |
9 | type_params::list(p); | 9 | type_params::type_param_list(p); |
10 | if p.at(COLON) { | 10 | if p.at(COLON) { |
11 | type_params::bounds(p); | 11 | type_params::bounds(p); |
12 | } | 12 | } |
@@ -21,7 +21,7 @@ pub(super) fn impl_item(p: &mut Parser) { | |||
21 | assert!(p.at(IMPL_KW)); | 21 | assert!(p.at(IMPL_KW)); |
22 | p.bump(); | 22 | p.bump(); |
23 | if choose_type_params_over_qpath(p) { | 23 | if choose_type_params_over_qpath(p) { |
24 | type_params::list(p); | 24 | type_params::type_param_list(p); |
25 | } | 25 | } |
26 | 26 | ||
27 | // TODO: never type | 27 | // TODO: never type |
diff --git a/src/parser/grammar/params.rs b/src/parser/grammar/params.rs index 99fedfc21..efa882394 100644 --- a/src/parser/grammar/params.rs +++ b/src/parser/grammar/params.rs | |||
@@ -5,11 +5,11 @@ use super::*; | |||
5 | // fn b(x: i32) {} | 5 | // fn b(x: i32) {} |
6 | // fn c(x: i32, ) {} | 6 | // fn c(x: i32, ) {} |
7 | // fn d(x: i32, y: ()) {} | 7 | // fn d(x: i32, y: ()) {} |
8 | pub(super) fn list(p: &mut Parser) { | 8 | pub(super) fn param_list(p: &mut Parser) { |
9 | list_(p, true) | 9 | list_(p, true) |
10 | } | 10 | } |
11 | 11 | ||
12 | pub(super) fn list_opt_types(p: &mut Parser) { | 12 | pub(super) fn param_list_opt_types(p: &mut Parser) { |
13 | list_(p, false) | 13 | list_(p, false) |
14 | } | 14 | } |
15 | 15 | ||
diff --git a/src/parser/grammar/paths.rs b/src/parser/grammar/paths.rs index 6f66701ac..fe69db096 100644 --- a/src/parser/grammar/paths.rs +++ b/src/parser/grammar/paths.rs | |||
@@ -71,7 +71,7 @@ fn path_segment(p: &mut Parser, mode: Mode, first: bool) { | |||
71 | fn path_generic_args(p: &mut Parser, mode: Mode) { | 71 | fn path_generic_args(p: &mut Parser, mode: Mode) { |
72 | match mode { | 72 | match mode { |
73 | Mode::Use => return, | 73 | Mode::Use => return, |
74 | Mode::Type => type_args::list(p, false), | 74 | Mode::Type => type_args::type_arg_list(p, false), |
75 | Mode::Expr => type_args::list(p, true), | 75 | Mode::Expr => type_args::type_arg_list(p, true), |
76 | } | 76 | } |
77 | } | 77 | } |
diff --git a/src/parser/grammar/type_args.rs b/src/parser/grammar/type_args.rs index 94d76b25a..5b960f10b 100644 --- a/src/parser/grammar/type_args.rs +++ b/src/parser/grammar/type_args.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use super::*; | 1 | use super::*; |
2 | 2 | ||
3 | pub(super) fn list(p: &mut Parser, colon_colon_required: bool) { | 3 | pub(super) fn type_arg_list(p: &mut Parser, colon_colon_required: bool) { |
4 | let m; | 4 | let m; |
5 | match (colon_colon_required, p.nth(0), p.nth(1)) { | 5 | match (colon_colon_required, p.nth(0), p.nth(1)) { |
6 | (_, COLONCOLON, L_ANGLE) => { | 6 | (_, COLONCOLON, L_ANGLE) => { |
diff --git a/src/parser/grammar/type_params.rs b/src/parser/grammar/type_params.rs index 2affd47cc..b31bf52b6 100644 --- a/src/parser/grammar/type_params.rs +++ b/src/parser/grammar/type_params.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use super::*; | 1 | use super::*; |
2 | 2 | ||
3 | pub(super) fn list(p: &mut Parser) { | 3 | pub(super) fn type_param_list(p: &mut Parser) { |
4 | if !p.at(L_ANGLE) { | 4 | if !p.at(L_ANGLE) { |
5 | return; | 5 | return; |
6 | } | 6 | } |
diff --git a/src/parser/grammar/types.rs b/src/parser/grammar/types.rs index 6535f6872..565037cb0 100644 --- a/src/parser/grammar/types.rs +++ b/src/parser/grammar/types.rs | |||
@@ -166,7 +166,7 @@ fn fn_pointer_type(p: &mut Parser) { | |||
166 | return; | 166 | return; |
167 | } | 167 | } |
168 | 168 | ||
169 | params::list(p); | 169 | params::param_list(p); |
170 | // test fn_pointer_type_with_ret | 170 | // test fn_pointer_type_with_ret |
171 | // type F = fn() -> (); | 171 | // type F = fn() -> (); |
172 | fn_ret_type(p); | 172 | fn_ret_type(p); |
@@ -179,7 +179,7 @@ fn for_type(p: &mut Parser) { | |||
179 | assert!(p.at(FOR_KW)); | 179 | assert!(p.at(FOR_KW)); |
180 | let m = p.start(); | 180 | let m = p.start(); |
181 | p.bump(); | 181 | p.bump(); |
182 | type_params::list(p); | 182 | type_params::type_param_list(p); |
183 | type_(p); | 183 | type_(p); |
184 | m.complete(p, FOR_TYPE); | 184 | m.complete(p, FOR_TYPE); |
185 | } | 185 | } |