Support universal function call syntax in function calls

This commit is contained in:
DJMcNab
2019-01-24 21:19:16 +00:00
parent abb9bfe44d
commit 4899e7be76
6 changed files with 226 additions and 6 deletions

View File

@@ -305,6 +305,8 @@ fn postfix_expr(
// fn foo() {
// let _ = f();
// let _ = f()(1)(1, 2,);
// let _ = f(<Foo>::func());
// f(<Foo as Trait>::func());
// }
fn call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker {
assert!(p.at(L_PAREN));

View File

@@ -40,6 +40,7 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet = LITERAL_FIRST.union(token_set![
L_PAREN,
L_CURLY,
L_BRACK,
L_ANGLE, // Universal function call syntax
PIPE,
MOVE_KW,
IF_KW,