diff options
author | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2022-01-24 01:19:26 +0000 |
---|---|---|
committer | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2022-01-24 01:19:26 +0000 |
commit | 65bae1869f1451253276e51fea5b808b38685bf9 (patch) | |
tree | 2f4f7382487cccbd47f6030e1999670ed044d646 /operators.c | |
parent | eb8e19f2964a2b0803d644c4cc7e15a8201cd46f (diff) |
Prepare for Dops later
Diffstat (limited to 'operators.c')
-rw-r--r-- | operators.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/operators.c b/operators.c index 05eed7d..c46e627 100644 --- a/operators.c +++ b/operators.c @@ -4,8 +4,8 @@ #include "apl9.h" -Rune primmonopnames[] = L"¨⍨⌸⌶&"; -Rune primdyadopnames[] = L"⍣.∘⍤⍥@⍠⌺"; +Rune primmonopnames[] = L"¨⍨⌸⌶&∆"; +Rune primdyadopnames[] = L"⍣.∘⍤⍥@⍠⌺⍙"; opmonad monadoperatordefs[] = { opEach, /* ¨ */ @@ -13,6 +13,7 @@ opmonad monadoperatordefs[] = { 0, /* ⌸ */ 0, /* ⌶ */ 0, /* & */ + opSelfReference1, /* ∆ */ }; opdyad dyadoperatordefs[] = { @@ -24,6 +25,7 @@ opdyad dyadoperatordefs[] = { 0, /* @ */ 0, /* ⍠ */ 0, /* ⌺ */ + opSelfReference2, /* ⍙ */ }; /* Monadic operators */ @@ -74,6 +76,13 @@ opSwitch(Datum *lefto, Array *left, Array *right) return nil; } +Array * +opSelfReference1(Datum *lefto, Array *left, Array *right) +{ + throwerror(L"∆", ESyntax); + return nil; +} + /* Dyadic operators */ Array * opBind(Datum *lefto, Datum *righto, Array *left, Array *right) @@ -160,4 +169,11 @@ opOver(Datum *lefto, Datum *righto, Array *left, Array *right) freearray(tmp); return res; } +} + +Array * +opSelfReference2(Datum *lefto, Datum *righto, Array *left, Array *right) +{ + throwerror(L"⍙", ESyntax); + return nil; }
\ No newline at end of file |