stmt: Support iterating over vector values

I ran into wanting to iterate over just the values of a vector and wondering
whether that could just work.

This adds support for the following, where v will be value of vec[i].

    local vec = vector("zero", "one", "two");

    for ( i, v in vec )
        print i, v;
This commit is contained in:
Arne Welzel 2022-08-21 17:14:28 +02:00
parent 0f8e675a49
commit f334df3b79
4 changed files with 66 additions and 16 deletions

View file

@ -0,0 +1,13 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
0, zero
1, one
2, two
4, four
0, zero
1, one
2, two
4, four
zero
one
two
four