From c977486f71a4010ac58a04e4fcb625f571c35aac Mon Sep 17 00:00:00 2001 From: fang Date: Thu, 7 Jul 2022 16:06:50 +0200 Subject: [PATCH] hoon: support ? and ~ in typed paths properly --- pkg/arvo/sys/hoon.hoon | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index 4d300b6d81..6e7c29942e 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -11756,7 +11756,7 @@ (stag %clsg (more fas stem)) == :: - ++ stem !: + ++ stem %+ knee *hoon |. ~+ %+ cook |= iota=$%([%hoon =hoon] iota) @@ -11773,7 +11773,7 @@ :- '$' (cold %$ buc) :- '0'^'9' (slot bisk:so) :- '-' (slot tash:so) - :- '.' zust:so + :- '.' ;~(pfix dot zust:so) :- '~' (slot ;~(pfix sig ;~(pose crub:so (easy [%n ~])))) :- '\'' (stag %t qut) :- '[' (slip (ifix [sel ser] wide)) @@ -13141,7 +13141,12 @@ ^- spec :+ %bccl [%leaf %tas aura] - [%bcts term [%base %atom aura]]~ + :_ ~ + :+ %bcts term + ?+ aura [%base %atom aura] + %f [%base %flag] + %n [%base %null] + == ;~(plug sym ;~(pfix tis pat mota)) :: :: /constant @@ -13159,6 +13164,11 @@ [%leaf %tas aura] [%base %atom aura]~ ;~(pfix pat mota) + :: + :: /? + :: + :- '?' + (cold [%bccl [%leaf %tas %f] [%base %flag] ~] wut) :: :: /~ :: @@ -13166,6 +13176,8 @@ (cold [%bccl [%leaf %tas %n] [%base %null] ~] sig) == :: + :: open-ended or fixed-length + :: ;~ pose (cold [%base %noun] ;~(plug fas tar)) (easy %base %null)