Manually handle nested expression arrays in KissInterp2
This commit is contained in:
@@ -95,8 +95,10 @@
|
||||
(let [stream (Stream.fromString str)]
|
||||
(read stream)))
|
||||
([:Stream s]
|
||||
(localVar nested (Reader.handleNesting s))
|
||||
(ifLet [(Some exp) (Reader.read s this)]
|
||||
{
|
||||
(when nested (Reader.deNest s))
|
||||
(s.dropWhitespace)
|
||||
exp
|
||||
}
|
||||
|
||||
@@ -439,6 +439,15 @@ class Reader {
|
||||
return array;
|
||||
}
|
||||
|
||||
public static function handleNesting(stream:Stream) {
|
||||
var nested = readExpArrayStartPositions.length != 0;
|
||||
_handleNesting(stream, nested);
|
||||
return nested;
|
||||
}
|
||||
public static function deNest(stream:Stream) {
|
||||
_finish(stream, true);
|
||||
}
|
||||
|
||||
static function _handleNesting(stream:Stream, nested:Bool) {
|
||||
if (nested) {
|
||||
nestedReadExpArrayStartPositions.push(readExpArrayStartPositions);
|
||||
|
||||
Reference in New Issue
Block a user