Add support for string literal property names in object maps.

This commit is contained in:
Stephen Chung
2020-03-30 12:14:59 +08:00
parent 45ee51874f
commit fce51758d1
4 changed files with 52 additions and 26 deletions

View File

@@ -18,8 +18,8 @@ fn test_map_indexing() -> Result<(), EvalAltResult> {
assert_eq!(
engine.eval::<char>(
r#"
let y = ${d: 1, e: ${a: 42, b: 88, c: "93"}, x: 9};
y.e["c"][1]
let y = ${d: 1, "e": ${a: 42, b: 88, "": "93"}, " 123 xyz": 9};
y.e[""][1]
"#
)?,
'3'