aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/parser.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parser.rs b/src/parser.rs
index df19ba4..8065aa8 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -220,7 +220,7 @@ impl<'a> Parser<'a> {
_ => break,
}
}
- None => {}
+ None => break
}
}
Some(ret)
@@ -1135,4 +1135,9 @@ trimmed in raw strings.
assert!(table.lookup("f f").is_some());
assert!(table.lookup("\"").is_some());
}
+
+ #[test]
+ fn invalid_bare_numeral() {
+ assert!(Parser::new("4").parse().is_none());
+ }
}