Allow nested containers by parsing their delimiters immediately

This commit is contained in:
Fang 2017-08-01 12:52:10 -07:00
parent 1b4fd3440c
commit 25f04ac5e5

View File

@ -491,7 +491,7 @@
?~ los ~&(%unterminated-line [~ +>(err `naz)])
?. =(`@`10 i.los)
?: (gth col q.naz)
?. (~(has in ^~((silt " -+>!"))) i.los)
?. =(' ' i.los)
~&(expected-indent+[col naz los] [~ +>(err `naz)])
$(los t.los, q.naz +(q.naz))
::
@ -657,8 +657,7 @@
++ abet :: accept line
::
:: nap: take first line
=^ nap +>.$ snap
..$(lub `[naz nap ~])
..$(lub `[naz ~])
::
++ apex ^+ . :: by column offset
?+ dif ~& offset+dif fail
@ -688,6 +687,10 @@
:: indent by 2
=. col (add 2 col)
::
:: "parse" marker
=. los (slag (sub col q.naz) los)
=. q.naz col
::
(push typ)
::
++ lent :: list entry