diff options
author | DJMcNab <[email protected]> | 2019-01-24 21:19:16 +0000 |
---|---|---|
committer | DJMcNab <[email protected]> | 2019-01-24 21:19:16 +0000 |
commit | 4899e7be76c5c8309222c8afe1c0f74dc59a4345 (patch) | |
tree | 986351c9e622ca516057e592cdc202fc724d6453 /crates/ra_syntax/src/grammar | |
parent | abb9bfe44dfe1fb0685ead5e000ed281c55c8968 (diff) |
Support universal function call syntax in function calls
Diffstat (limited to 'crates/ra_syntax/src/grammar')
-rw-r--r-- | crates/ra_syntax/src/grammar/expressions.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar/expressions/atom.rs | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/grammar/expressions.rs b/crates/ra_syntax/src/grammar/expressions.rs index 2236555e0..7ee32fa7c 100644 --- a/crates/ra_syntax/src/grammar/expressions.rs +++ b/crates/ra_syntax/src/grammar/expressions.rs | |||
@@ -305,6 +305,8 @@ fn postfix_expr( | |||
305 | // fn foo() { | 305 | // fn foo() { |
306 | // let _ = f(); | 306 | // let _ = f(); |
307 | // let _ = f()(1)(1, 2,); | 307 | // let _ = f()(1)(1, 2,); |
308 | // let _ = f(<Foo>::func()); | ||
309 | // f(<Foo as Trait>::func()); | ||
308 | // } | 310 | // } |
309 | fn call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { | 311 | fn call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { |
310 | assert!(p.at(L_PAREN)); | 312 | assert!(p.at(L_PAREN)); |
diff --git a/crates/ra_syntax/src/grammar/expressions/atom.rs b/crates/ra_syntax/src/grammar/expressions/atom.rs index 167a76551..5feca090c 100644 --- a/crates/ra_syntax/src/grammar/expressions/atom.rs +++ b/crates/ra_syntax/src/grammar/expressions/atom.rs | |||
@@ -40,6 +40,7 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet = LITERAL_FIRST.union(token_set![ | |||
40 | L_PAREN, | 40 | L_PAREN, |
41 | L_CURLY, | 41 | L_CURLY, |
42 | L_BRACK, | 42 | L_BRACK, |
43 | L_ANGLE, // Universal function call syntax | ||
43 | PIPE, | 44 | PIPE, |
44 | MOVE_KW, | 45 | MOVE_KW, |
45 | IF_KW, | 46 | IF_KW, |