clay: condense +pile-rule

Rewrites the `+pile-rule` parsing rule for compactness and legibility.
This is a purely stylistic change.
This commit is contained in:
fang 2020-12-24 13:03:56 +01:00 committed by GitHub
parent 327a542952
commit 1b1b613729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -807,75 +807,49 @@
++ pile-rule
|= pax=path
%- full
%+ ifix [gay gay]
%+ cook |=(pile +<)
;~ pfix
%+ ifix
:_ gay
:: parse optional /? and ignore
::
;~ pose
(cold ~ ;~(plug fas wut gap dem gap))
(easy ~)
==
::
;~(plug gay (punt ;~(plug fas wut gap dem gap)))
|^
;~ plug
;~ pose
;~ sfix
%+ cook |=((list (list taut)) (zing +<))
%+ more gap
;~ pfix ;~(plug fas hep gap)
%+ cook (bake zing (list (list taut)))
%+ rune hep
(most ;~(plug com gaw) taut-rule)
==
gap
==
(easy ~)
==
::
;~ pose
;~ sfix
%+ cook |=((list (list taut)) (zing +<))
%+ more gap
;~ pfix ;~(plug fas lus gap)
%+ cook (bake zing (list (list taut)))
%+ rune lus
(most ;~(plug com gaw) taut-rule)
==
gap
==
(easy ~)
==
::
;~ pose
;~ sfix
%+ cook |=((list [face=term =path]) +<)
%+ more gap
;~ pfix ;~(plug fas tis gap)
%+ cook |=([term path] +<)
;~(plug sym ;~(pfix ;~(plug gap fas) (more fas urs:ab)))
==
gap
==
(easy ~)
==
%+ rune tis
;~(plug sym ;~(pfix gap fas (more fas urs:ab)))
::
;~ pose
;~ sfix
%+ cook |=((list [face=term =mark =path]) +<)
%+ more gap
;~ pfix ;~(plug fas tar gap)
%+ cook |=([term mark path] +<)
;~ plug
%+ rune tar
;~ (glue gap)
sym
;~(pfix ;~(plug gap cen) sym)
;~(pfix ;~(plug gap fas) (more fas urs:ab))
==
==
gap
==
(easy ~)
;~(pfix cen sym)
;~(pfix fas (more fas urs:ab))
==
::
%+ cook |=(huz=(list hoon) `hoon`tssg+huz)
%+ stag %tssg
(most gap tall:(vang & pax))
==
==
::
++ pant
|* fel=^rule
;~(pose fel (easy ~))
::
++ mast
|* [bus=^rule fel=^rule]
;~(sfix (more bus fel) bus)
::
++ rune
|* [bus=^rule fel=^rule]
%- pant
%+ mast gap
;~(pfix fas bus gap fel)
--
::
++ taut-rule
%+ cook |=(taut +<)