Skip to content

For Grammar Improvements

Michael Aaron Murphy requested to merge mmstick:for_grammar into master

This change will connect the for grammar to shell_expand, thus enabling the possibility to write expressions like so:

for index in $(seq 0 10)
    echo $index
end

This also implements inclusive and exclusive ranges. Not sure if we want to go with this syntax, but I figured I'd use the same syntax as Rust.

Inclusive Range

for index in 0...10
    echo $index
end

Exclusive Range

for index in 0..11
    echo $index
end

Eliminates the need to use the seq command.

Merge request reports