Move Let / Export Into Grammar
This is required in order to move forward with arrays as first class citizens in the shell, because it is vital to not expand the let statement before parsing it.
let array = [ one two three ]
It is also required in order to pass complex arithmetic expressions and have the assignment parser distinguish between an arithmetic expression and regular expression, in the event that we would like to gain support for such a feature.
let a = (b * h) ^ 2
-
Migrate let into grammar -
Migrate export into grammar -
If parsed let statement returns a vector, create an array -
Implement basic mathematics for arrays
$ let a = 1
$ let a += [ 2 2 5 ]
$ echo $a
10
$ let b = [ 2 2 5 ]
$ let b += 5
$ echo @b
7 7 10