Unterminated Brace Panic
Created by: emturner
Problem:
Unterminated brace panic on echo [{ }]
Caused by ArgumentSplitter
- [{ }]
gets parsed to Array('{', '}')
, resulting in the brace_expander
panicking when it recieves only '{'
.
Solution: Change the behaviour of ArgumentSplitter to only split by space when not in the middle of a pair of braces (as already happens with arrays).
Changes introduced by this pull request:
- Adds
b'{'
andb'}'
arms toArgumentSplitter::next
which increment and decrementblevel
respectively. As with arrays,ArgumentSplitter
only splits on space whenblevel = 0
. - Adds integration test
arrays_with_braces.ion
Fixes: fixes #707 (closed)
State: Ready