diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-12 18:01:22 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-12 18:01:22 +0200 |
| commit | 1a70cb6a330990dc0ab373905d12458ef87afbad (patch) | |
| tree | 5d82f7124734e146c2d00ce3661294ebe9d91fb4 /src/parse/mod.rs | |
| parent | 5243878d810d4817c81acc9ae346d46757fcf602 (diff) | |
Naming and grammar ✔
Diffstat (limited to 'src/parse/mod.rs')
| -rw-r--r-- | src/parse/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/parse/mod.rs b/src/parse/mod.rs index 90fdbf5d..d2408c7b 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -268,8 +268,8 @@ fn dict_contents(p: &mut Parser) -> (LitDict, bool) { comma_and_keyless = false; } - let coercable = comma_and_keyless && !dict.0.is_empty(); - (dict, coercable) + let coercible = comma_and_keyless && !dict.0.is_empty(); + (dict, coercible) } /// Parse a single entry in a dictionary. @@ -458,9 +458,9 @@ fn content(p: &mut Parser) -> SynTree { /// Parse a parenthesized expression: `(a + b)`, `(1, key="value"). fn parenthesized(p: &mut Parser) -> Expr { p.start_group(Group::Paren); - let (dict, coercable) = dict_contents(p); - let expr = if coercable { - dict.0.into_iter().next().expect("dict is coercable").expr.v + let (dict, coercible) = dict_contents(p); + let expr = if coercible { + dict.0.into_iter().next().expect("dict is coercible").expr.v } else { Expr::Lit(Lit::Dict(dict)) }; |
