aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src/grammar/expressions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/parser/src/grammar/expressions.rs')
-rw-r--r--crates/parser/src/grammar/expressions.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/parser/src/grammar/expressions.rs b/crates/parser/src/grammar/expressions.rs
index 3291e3f14..e72929f8c 100644
--- a/crates/parser/src/grammar/expressions.rs
+++ b/crates/parser/src/grammar/expressions.rs
@@ -22,7 +22,7 @@ pub(super) fn expr(p: &mut Parser) -> (Option<CompletedMarker>, BlockLike) {
22pub(super) fn expr_with_attrs(p: &mut Parser) -> bool { 22pub(super) fn expr_with_attrs(p: &mut Parser) -> bool {
23 let m = p.start(); 23 let m = p.start();
24 let has_attrs = p.at(T![#]); 24 let has_attrs = p.at(T![#]);
25 attributes::outer_attributes(p); 25 attributes::outer_attrs(p);
26 26
27 let (cm, _block_like) = expr(p); 27 let (cm, _block_like) = expr(p);
28 let success = cm.is_some(); 28 let success = cm.is_some();
@@ -64,7 +64,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
64 // #[D] return (); 64 // #[D] return ();
65 // } 65 // }
66 let has_attrs = p.at(T![#]); 66 let has_attrs = p.at(T![#]);
67 attributes::outer_attributes(p); 67 attributes::outer_attrs(p);
68 68
69 if p.at(T![let]) { 69 if p.at(T![let]) {
70 let_stmt(p, m, with_semi); 70 let_stmt(p, m, with_semi);
@@ -175,7 +175,7 @@ pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {
175 175
176pub(super) fn expr_block_contents(p: &mut Parser) { 176pub(super) fn expr_block_contents(p: &mut Parser) {
177 // This is checked by a validator 177 // This is checked by a validator
178 attributes::inner_attributes(p); 178 attributes::inner_attrs(p);
179 179
180 while !p.at(EOF) && !p.at(T!['}']) { 180 while !p.at(EOF) && !p.at(T!['}']) {
181 // test nocontentexpr 181 // test nocontentexpr
@@ -489,7 +489,7 @@ fn method_call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker {
489 let m = lhs.precede(p); 489 let m = lhs.precede(p);
490 p.bump_any(); 490 p.bump_any();
491 name_ref(p); 491 name_ref(p);
492 type_args::opt_type_arg_list(p, true); 492 type_args::opt_generic_arg_list(p, true);
493 if p.at(T!['(']) { 493 if p.at(T!['(']) {
494 arg_list(p); 494 arg_list(p);
495 } 495 }
@@ -585,7 +585,7 @@ fn path_expr(p: &mut Parser, r: Restrictions) -> (CompletedMarker, BlockLike) {
585 paths::expr_path(p); 585 paths::expr_path(p);
586 match p.current() { 586 match p.current() {
587 T!['{'] if !r.forbid_structs => { 587 T!['{'] if !r.forbid_structs => {
588 record_field_list(p); 588 record_expr_field_list(p);
589 (m.complete(p, RECORD_EXPR), BlockLike::NotBlock) 589 (m.complete(p, RECORD_EXPR), BlockLike::NotBlock)
590 } 590 }
591 T![!] if !p.at(T![!=]) => { 591 T![!] if !p.at(T![!=]) => {
@@ -603,7 +603,7 @@ fn path_expr(p: &mut Parser, r: Restrictions) -> (CompletedMarker, BlockLike) {
603// S { x, y: 32, ..Default::default() }; 603// S { x, y: 32, ..Default::default() };
604// TupleStruct { 0: 1 }; 604// TupleStruct { 0: 1 };
605// } 605// }
606pub(crate) fn record_field_list(p: &mut Parser) { 606pub(crate) fn record_expr_field_list(p: &mut Parser) {
607 assert!(p.at(T!['{'])); 607 assert!(p.at(T!['{']));
608 let m = p.start(); 608 let m = p.start();
609 p.bump(T!['{']); 609 p.bump(T!['{']);
@@ -613,7 +613,7 @@ pub(crate) fn record_field_list(p: &mut Parser) {
613 // fn main() { 613 // fn main() {
614 // S { #[cfg(test)] field: 1 } 614 // S { #[cfg(test)] field: 1 }
615 // } 615 // }
616 attributes::outer_attributes(p); 616 attributes::outer_attrs(p);
617 617
618 match p.current() { 618 match p.current() {
619 IDENT | INT_NUMBER => { 619 IDENT | INT_NUMBER => {