From 8c6c1d9042c6dfa7f385f89ebb54173f11e4a1a5 Mon Sep 17 00:00:00 2001 From: Dan Haffey Date: Sun, 29 Nov 2015 18:44:03 -0800 Subject: [PATCH] Reject malformed =^ at parse time. This prevents bad =^ forms like =^(1 2 3 4) from slipping through and crashing in open:ap. (Which can in turn crash dojo, naturally.) It looks like %tskt should also be defined as [%tskt p=term q=wing r=twig s=twig] in ++twig, but full-on language migrations are beyond my pay grade. --- arvo/hoon.hoon | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index ae4722a662..ffef775fa5 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -9678,7 +9678,7 @@ ^. stet ^. limo :~ ['|' (rune bar %tsbr expo)] ['.' (rune dot %tsdt expq)] - ['^' (rune ket %tskt expd)] + ['^' (rune ket %tskt bono)] [':' (rune col %tscl expp)] ['<' (rune gal %tsgl expb)] ['>' (rune gar %tsgr expb)] @@ -9871,6 +9871,13 @@ == loaf == + ++ bono |. :: term, wing, 2 twigs + ;~ gunk :: (as twigs) + (cook |=(cog=term [%cnzz [cog ~]]) sym) + (cook |=(hyp=wing [%cnzz hyp]) rope) + loaf + loaf + == ++ bont ;~ (bend) :: term, optional twig ;~(pfix cen sym) ;~(pfix dot ;~(pose wide ;~(pfix muck loaf)))