@@ -5,8 +5,15 @@ apex
7 %^ tnee %apex ast
7 %^ tnee %apex ast
13+ (star ;~(less (just '\0a') next))
8− %+ ifix [ws ws]
16+ %+ ifix [ws ws]
10 (cook |=(=blok [%blok blok]) parse-blok)
17 (cook |=(=blok [%blok blok]) parse-blok)
12:: The expressions that are separated by binary operators
19:: The expressions that are separated by binary operators
@@ -169,17 +176,17 @@ apex
169 (cold %mod (jest '%'))
176 (cold %mod (jest '%'))
170 (cold %band (jest '&'))
177 (cold %band (jest '&'))
171 (cold %bor (jest '|'))
178 (cold %bor (jest '|'))
172− (cold %bxor (jest '~'))
179+ (cold %eq (jest '=='))
173 (cold %rshft (jest '>>'))
180 (cold %rshft (jest '>>'))
174 (cold %lshft (jest '<<'))
181 (cold %lshft (jest '<<'))
182+ (cold %lteq (jest '<='))
183+ (cold %gteq (jest '>='))
184+ (cold %neq (jest '~='))
185+ (cold %bxor (jest '~'))
175 (cold %and (jest 'and'))
186 (cold %and (jest 'and'))
176 (cold %or (jest 'or'))
187 (cold %or (jest 'or'))
177 (cold %lt (jest '<'))
188 (cold %lt (jest '<'))
178− (cold %lteq (jest '<='))
179− (cold %eq (jest '=='))
180 (cold %gt (jest '>'))
189 (cold %gt (jest '>'))
181− (cold %gteq (jest '>='))
182− (cold %neq (jest '~='))
183 (cold %concat (jest '..'))
190 (cold %concat (jest '..'))
185++ parse-numeral
192++ parse-numeral
@@ -511,31 +518,41 @@ apex
511++ parse-if
518++ parse-if
512 %^ tnee %parse-if if
519 %^ tnee %parse-if if
514− |= [* cond=expr * body=blok elsa=(list [cond=expr body=blok]) else=(unit blok) *]
521+ |= [[* cond=expr * body=blok] elsa=(list [cond=expr body=blok]) else=(unit blok) *]
515 [cond body elsa else]
522 [cond body elsa else]
516− ;~ (glue wss)
523+ ;~ plug
524− |= [* cond=expr * body=blok] [cond body]
525 ;~ (glue wss)
524 ;~ (glue wss)
526− (jest 'elseif')
525+ (jest 'if')
527 parse-expr
526 parse-expr
528 (jest 'then')
527 (jest 'then')
529 parse-blok
528 parse-blok
533+ |= [* cond=expr * body=blok] [cond body]
534 |= [* =blok] blok
546 |= [* =blok] blok
535− ;~ (glue wss)
549+ ;~ (glue wss)
536− (jest 'else')
550+ (jest 'else')
537− parse-blok
551+ parse-blok
539 (jest 'end')
556 (jest 'end')
541++ parse-functioncall
558++ parse-functioncall
@@ -601,19 +618,17 @@ apex
601 |= ret=(unit ret) [stats ret]
618 |= ret=(unit ret) [stats ret]
604− ?~ stats (easy ~) wss
621+ ?~ stats ws wss
605 parse-ret
622 parse-ret
607++ parse-ret
624++ parse-ret
608 %^ tnee %parse-ret ret
625 %^ tnee %parse-ret ret
610− |= [[* =exprlist] *] exprlist
627+ |= [* ret=(unit exprlist) *] ret
613− (jest 'return')
629+ (jest 'return')
614− parse-exprlist
630+ (punt ;~(pfix wss parse-exprlist))
616− (punt (just ';'))
631+ (punt ;~(plug ws (just ';')))
618++ parse-name
633++ parse-name
@@ -630,8 +645,15 @@ apex
630 =/ prev-edge (prev nail)
645 =/ prev-edge (prev nail)
631 ?~ q.prev-edge prev-edge
646 ?~ q.prev-edge prev-edge
632 ((cont p.u.q.prev-edge) q.u.q.prev-edge)
647 ((cont p.u.q.prev-edge) q.u.q.prev-edge)
651+ (star ;~(less nl next))
636 (just '\09')
658 (just '\09')