diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 10:26:19 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 10:26:19 +0100 |
commit | c244dd10343ff96a73879c593bd9253c4073cb90 (patch) | |
tree | a804c3945b9959396be32c7bf8d09d5c0d8cef66 /src/parser/grammar/attributes.rs | |
parent | aea86d154ec5adde6adb05088a50f01380ffb8bf (diff) |
Call expr
Diffstat (limited to 'src/parser/grammar/attributes.rs')
-rw-r--r-- | src/parser/grammar/attributes.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser/grammar/attributes.rs b/src/parser/grammar/attributes.rs index 7f1c0401a..c411d4d7f 100644 --- a/src/parser/grammar/attributes.rs +++ b/src/parser/grammar/attributes.rs | |||
@@ -36,7 +36,7 @@ fn meta_item(p: &mut Parser) { | |||
36 | match p.current() { | 36 | match p.current() { |
37 | EQ => { | 37 | EQ => { |
38 | p.bump(); | 38 | p.bump(); |
39 | if !expressions::literal(p) { | 39 | if expressions::literal(p).is_none() { |
40 | p.error("expected literal"); | 40 | p.error("expected literal"); |
41 | } | 41 | } |
42 | } | 42 | } |
@@ -56,7 +56,7 @@ fn meta_item_arg_list(p: &mut Parser) { | |||
56 | match p.current() { | 56 | match p.current() { |
57 | EOF | R_PAREN => break, | 57 | EOF | R_PAREN => break, |
58 | IDENT => meta_item(p), | 58 | IDENT => meta_item(p), |
59 | c => if !expressions::literal(p) { | 59 | c => if expressions::literal(p).is_none() { |
60 | let message = "expected attribute"; | 60 | let message = "expected attribute"; |
61 | 61 | ||
62 | if items::ITEM_FIRST.contains(c) { | 62 | if items::ITEM_FIRST.contains(c) { |