Support for trailing commas.

This commit is contained in:
Stephen Chung
2020-06-16 22:14:46 +08:00
parent dc540755e7
commit 1adf3cc39a
11 changed files with 173 additions and 128 deletions

View File

@@ -12,6 +12,10 @@ fn test_map_indexing() -> Result<(), Box<EvalAltResult>> {
engine.eval::<INT>(r#"let x = #{a: 1, b: 2, c: 3}; x["b"]"#)?,
2
);
assert_eq!(
engine.eval::<INT>(r#"let x = #{a: 1, b: 2, c: 3,}; x["b"]"#)?,
2
);
assert_eq!(
engine.eval::<char>(
r#"