urbit/pkg/arvo/lib/language-server/parser.hoon

86 lines
1.8 KiB
Plaintext
Raw Normal View History

:: lifted directly from ford, should probably be in zuse
2020-05-14 09:26:52 +03:00
=, clay
=< pile-rule
|%
2020-05-14 09:26:52 +03:00
++ pile-rule
|= pax=path
%- full
%+ ifix [gay gay]
%+ cook |=(pile +<)
;~ pfix
:: parse optional /? and ignore
::
;~ pose
2020-11-15 08:08:52 +03:00
(cold ~ ;~(plug fas wut gap dem gap))
2020-05-14 09:26:52 +03:00
(easy ~)
==
::
2020-05-14 09:26:52 +03:00
;~ plug
;~ pose
;~ sfix
%+ cook |=((list (list taut)) (zing +<))
%+ more gap
2020-11-15 08:08:52 +03:00
;~ pfix ;~(plug fas hep gap)
2020-05-14 09:26:52 +03:00
(most ;~(plug com gaw) taut-rule)
==
gap
==
2020-05-14 09:26:52 +03:00
(easy ~)
==
::
2020-05-14 09:26:52 +03:00
;~ pose
;~ sfix
%+ cook |=((list (list taut)) (zing +<))
%+ more gap
2020-11-15 08:08:52 +03:00
;~ pfix ;~(plug fas lus gap)
2020-05-14 09:26:52 +03:00
(most ;~(plug com gaw) taut-rule)
==
gap
==
(easy ~)
==
::
2020-05-14 09:26:52 +03:00
;~ pose
;~ sfix
%+ cook |=((list [face=term =path]) +<)
%+ more gap
2020-11-15 08:08:52 +03:00
;~ pfix ;~(plug fas tis gap)
2020-05-14 09:26:52 +03:00
%+ cook |=([term path] +<)
2020-11-15 08:08:52 +03:00
;~(plug sym ;~(pfix ;~(plug gap fas) (more fas urs:ab)))
2020-05-14 09:26:52 +03:00
==
gap
==
(easy ~)
==
::
2020-05-14 09:26:52 +03:00
;~ pose
;~ sfix
%+ cook |=((list [face=term =mark =path]) +<)
%+ more gap
2020-11-15 08:08:52 +03:00
;~ pfix ;~(plug fas tar gap)
2020-05-14 09:26:52 +03:00
%+ cook |=([term mark path] +<)
;~ plug
sym
;~(pfix ;~(plug gap cen) sym)
2020-11-15 08:08:52 +03:00
;~(pfix ;~(plug gap fas) (more fas urs:ab))
2020-05-14 09:26:52 +03:00
==
==
gap
==
(easy ~)
==
2020-05-14 09:26:52 +03:00
::
%+ cook |=(huz=(list hoon) `hoon`tssg+huz)
(most gap tall:(vang & pax))
==
2020-05-14 09:26:52 +03:00
==
::
++ taut-rule
%+ cook |=(taut +<)
;~ pose
(stag ~ ;~(pfix tar sym))
;~(plug (stag ~ sym) ;~(pfix tis sym))
(cook |=(a=term [`a a]) sym)
==
--