about summary refs log tree commit diff
path: root/src/parser/expr.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2021-03-14T16·27-0400
committerGriffin Smith <root@gws.fyi>2021-03-14T16·27-0400
commit7960c3270e1a338f4da40d044a6896df96d82c79 (patch)
treea9e3ed46da89525ba7887c7be84539510b6b8a6a /src/parser/expr.rs
parent39656a3801bb311edd9ebb65e92a24fc48f69ec7 (diff)
Make string and bool parsing complete
Diffstat (limited to 'src/parser/expr.rs')
-rw-r--r--src/parser/expr.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser/expr.rs b/src/parser/expr.rs
index 2ec6d60cd04f..fd37fcb9c67c 100644
--- a/src/parser/expr.rs
+++ b/src/parser/expr.rs
@@ -160,8 +160,8 @@ where
 named!(int(&str) -> Literal, map!(flat_map!(digit1, parse_to!(u64)), Literal::Int));
 
 named!(bool_(&str) -> Literal, alt!(
-    tag!("true") => { |_| Literal::Bool(true) } |
-    tag!("false") => { |_| Literal::Bool(false) }
+    complete!(tag!("true")) => { |_| Literal::Bool(true) } |
+    complete!(tag!("false")) => { |_| Literal::Bool(false) }
 ));
 
 fn string_internal(i: &str) -> nom::IResult<&str, Cow<'_, str>, nom::error::Error<&str>> {
@@ -172,7 +172,7 @@ fn string_internal(i: &str) -> nom::IResult<&str, Cow<'_, str>, nom::error::Erro
 }
 
 named!(string(&str) -> Literal, preceded!(
-    char!('"'),
+    complete!(char!('"')),
     map!(
         string_internal,
         |s| Literal::String(s)