on master help sign in
fixed keyword exclusion
bd8a7b7iko
desk/lib/lua/parser.hoon+41−26
@@ -766,7 +766,7 @@ apex
766 ++ name-fst-char ;~(pose alf:ab (just '_'))
766 ++ name-fst-char ;~(pose alf:ab (just '_'))
767 --
767 --
768 %+ cook |= =tape (crip tape)
768 %+ cook |= =tape (crip tape)
769− ;~(less ;~(plug keyword ;~(less name-char (easy ~))) ;~(plug name-fst-char (star name-char)))
769+ ;~(less keyword ;~(plug name-fst-char (star name-char)))
770++ bind
770++ bind
771 |* =mold
771 |* =mold
772 |* [prev=rule cont=$-(mold rule)]
772 |* [prev=rule cont=$-(mold rule)]
@@ -900,31 +900,39 @@ apex
900 ;< res=_p:(need q:$:$:inner) bind (inner closing)
900 ;< res=_p:(need q:$:$:inner) bind (inner closing)
901 %+ cold res closing
901 %+ cold res closing
902++ keyword
902++ keyword
903− %+ cold ~
903+ =<
904− ;~ pose
904+ %+ sear
905+ |= word=tape
906+ ^- (unit ~)
907+ ?: (elem word keyword-names) `~ ~
908+ (plus alf:ab)
909+ |%
910+ ++ keyword-names
911+ :~
905− (jest 'and')
912+ "and"
906− (jest 'break')
913+ "break"
907− (jest 'do')
914+ "do"
908− (jest 'else')
915+ "else"
909− (jest 'elseif')
916+ "elseif"
910− (jest 'end')
917+ "end"
911− (jest 'false')
918+ "false"
912− (jest 'for')
919+ "for"
913− (jest 'function')
920+ "function"
914− (jest 'goto')
921+ "goto"
915− (jest 'if')
922+ "if"
916− (jest 'in')
923+ "in"
917− (jest 'local')
924+ "local"
918− (jest 'nil')
925+ "nil"
919− (jest 'not')
926+ "not"
920− (jest 'or')
927+ "or"
921− (jest 'repeat')
928+ "repeat"
922− (jest 'return')
929+ "return"
923− (jest 'then')
930+ "then"
924− (jest 'true')
931+ "true"
925− (jest 'until')
932+ "until"
926− (jest 'while')
933+ "while"
927− ==
934+ ==
935+ --
928++ tnee
936++ tnee
929 |* [=term gar=mold sef=rule]
937 |* [=term gar=mold sef=rule]
930 |= tub=nail
938 |= tub=nail
@@ -936,6 +944,13 @@ apex
936 ?~ q.res
944 ?~ q.res
937 ~& [term %nope] res
945 ~& [term %nope] res
938 ~& > [term %ok] res
946 ~& > [term %ok] res
947+++ neg
948+ |* =rule
949+ |= =nail
950+ ^- (like ~)
951+ =/ x (rule nail)
952+ :- p.nail
953+ ?~ q.x `[~ nail] ~
939++ blok-is-empty
954++ blok-is-empty
940 |= =blok
955 |= =blok
941 ^- ?
956 ^- ?