Implemented array storage
This commit is contained in:
parent
5dee0777e7
commit
52e87a8885
17 changed files with 150 additions and 45 deletions
|
@ -79,6 +79,10 @@ func TestParse(t *testing.T) {
|
|||
{"Function calls 27", "sum(a,b)*2+15*4", "(+ (* (λ sum a b) 2) (* 15 4))"},
|
||||
{"Package function calls", "math.sum(a,b)", "(λ (. math sum) a b)"},
|
||||
{"Package function calls 2", "generic.math.sum(a,b)", "(λ (. (. generic math) sum) a b)"},
|
||||
{"Array access", "a[0]", "(@ a 0)"},
|
||||
{"Array access 2", "a[b+c]", "(@ a (+ b c))"},
|
||||
{"Array access 3", "a.b[c]", "(@ (. a b) c)"},
|
||||
{"Array access 4", "a.b[c+d]", "(@ (. a b) (+ c d))"},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue