diff options
author | Aleksey Kladov <[email protected]> | 2020-01-17 10:15:07 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-17 10:15:07 +0000 |
commit | 90b8a31b83b1aafc3fb555ba4307527f9258f46d (patch) | |
tree | b4f5acac622f1514b83dc4dc11321a0ca484308d /crates/ra_parser | |
parent | ea2b27d8b978fbe2307991ff28d6030eabf5b82c (diff) | |
parent | f077d5c303ecc4f38471b37be985bb0c5ab2f68c (diff) |
Merge pull request #2813 from jyn514/arg_attributes
Allow attributes before function arguments
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index d733499d1..a31a7a08d 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -540,6 +540,11 @@ fn arg_list(p: &mut Parser) { | |||
540 | let m = p.start(); | 540 | let m = p.start(); |
541 | p.bump(T!['(']); | 541 | p.bump(T!['(']); |
542 | while !p.at(T![')']) && !p.at(EOF) { | 542 | while !p.at(T![')']) && !p.at(EOF) { |
543 | // test arg_with_attr | ||
544 | // fn main() { | ||
545 | // foo(#[attr] 92) | ||
546 | // } | ||
547 | attributes::outer_attributes(p); | ||
543 | if !p.at_ts(EXPR_FIRST) { | 548 | if !p.at_ts(EXPR_FIRST) { |
544 | p.error("expected expression"); | 549 | p.error("expected expression"); |
545 | break; | 550 | break; |