Add record literal syntax (#326)

This commit is contained in:
JT
2021-11-11 12:14:00 +13:00
committed by GitHub
parent 586c6d9fa8
commit 568e566adf
9 changed files with 160 additions and 4 deletions

View File

@@ -889,3 +889,13 @@ fn in_variable_5() -> TestResult {
fn in_variable_6() -> TestResult {
run_test(r#"3 | if $in > 6 { $in - 10 } else { $in * 10 }"#, "30")
}
#[test]
fn record_1() -> TestResult {
run_test(r#"{'a': 'b'} | get a"#, "b")
}
#[test]
fn record_2() -> TestResult {
run_test(r#"{'b': 'c'}.b"#, "c")
}