on master help sign in
wip
commitfeb5f7cd99fb4a63d493feaa2e540a468f42219c authoriko <mail@iko.soy> dateFri 12 Jul 2024, 14:46 (2 years ago) parent824add2
1 file changed+21−15
zod/luau/lib/lua.hoon+21−15
zod/luau/lib/lua.hoon+21−15
@@ -34,6 +34,8 @@
3434 [%false ~]
3535 [%nil ~]
3636 ==
37+:: The expressions that are separated by binary operators
38+::
3739++ parse-atomic-expr
3840 %^ tnee %parse-atomic-expr expr
3941 ;~ pose
@@ -58,6 +60,8 @@
5860 |=(=string [%string string])
5961 parse-string
6062 ==
63+:: Parse expressions separated by binary operators
64+::
6165++ parse-expr-list
6266 %^ tnee %parse-expr-list (interlist binop expr)
6367 %+ parse-interlist (ifix [ws ws] parse-binop) parse-atomic-expr
@@ -396,18 +400,15 @@
396400 ==
397401 --
398402 ;~ pose
399− ;< prefix=name bind parse-name
400− ;~ pose
401− (parse-access [%var %name prefix])
402− (parse-dot [%var %name prefix])
403− (easy [%name prefix])
404− ==
405− ::
406− ;< prefix=prefix-expr bind parse-parened-expr
403+ ;< prefix=prefix-expr bind parse-simple-prefix-expr
407404 ;~ pose
408405 (parse-access prefix)
409406 (parse-dot prefix)
410407 ==
408+ ::
409+ %+ cook
410+ |=(=name [%name name])
411+ parse-name
411412 ==
412413:: varlist
413414::
@@ -432,11 +433,19 @@
432433 ;~ pose
433434 parse-parened-expr
434435 ::
435− %+ cook |=([=var] [%var var]) parse-var
436+ %+ cook |=([=name] [%var %name name]) parse-name
437+ ==
438+++ parse-prefix-expr-without-functioncall
439+ %^ tnee %parse-prefix-expr prefix-expr
440+ ;~ pose
441+ parse-parened-expr
442+ ::
443+ %+ cook |=(=var [%var var])
444+ parse-var
436445 ==
437446++ parse-prefix-expr
438447 %^ tnee %parse-prefix-expr prefix-expr
439− ;< prefix=$%([%expr expr] [%var var]) bind parse-simple-prefix-expr
448+ ;< prefix=prefix-expr bind parse-prefix-expr-without-functioncall
440449 ;~ pose
441450 %+ cook |=(=functioncall [%call functioncall])
442451 (parse-functioncall-args prefix)
@@ -677,7 +686,6 @@
677686 ==
678687++ parse-functioncall-args
679688 |= =prefix-expr
680− ~& prefix-expr
681689 %^ tnee %parse-functioncall-args functioncall
682690 ;~ pfix
683691 ws
@@ -802,8 +810,6 @@
802810 %- zing
803811 %+ join "," l
804812++ parse-name
805− :: %^ tnee %parse-name name
806− :: |.
807813 =>
808814 |%
809815 ++ name-char ;~(pose name-fst-char dit:ab)
@@ -943,10 +949,10 @@
943949 ==
944950++ tnee
945951 |* [=term gar=mold sef=rule]
946− |* tub=nail
952+ |= tub=nail
947953 ^- (like gar)
948954 =/ trace &
949− =/ foo ?: trace ~&([term q.tub] ~) ~
955+ ~? trace [term q.tub]
950956 =/ res (sef tub)
951957 ?. trace res
952958 ?~ q.res