github.com/lab47/exprcore@v0.0.0-20210525052339-fb7d6bd9331e/exprcore/testdata/exprcore_eval.star (about) 1 load("assert.star", "assert") 2 3 v = %{ "a": 1 } 4 5 c = => @a 6 7 d = c.bind(v) 8 9 assert.eq(1, d()) 10 11 person = { 12 age: 12 13 def bar() { 14 return 13 15 } 16 } 17 18 assert.eq(12, person.age) 19 20 april = person(name: "april") 21 22 assert.eq("april", april.name) 23 assert.eq(12, april.age) 24 assert.eq(13, april.bar())