operator-dot: added support to access dict value by exprssion; example: D.key, D."key", D.expr
This commit is contained in:
@@ -39,6 +39,9 @@ func TestDictParser(t *testing.T) {
|
||||
//"b":2,
|
||||
"c":3
|
||||
}`, map[any]any{"a": 1, "c": 3}, nil},
|
||||
/* 13 */ {`D={"a":1, "b":2}; D."a"`, int64(1), nil},
|
||||
/* 14 */ {`D={"a":1, "b":2}; D.a`, int64(1), nil},
|
||||
/* 15 */ {`D={1:"a", 2:"b", 3:"c"}; D.(1+2)`, "c", nil},
|
||||
}
|
||||
|
||||
succeeded := 0
|
||||
|
||||
Reference in New Issue
Block a user