From 468e0f6313fb620bd2f7ea469178fe02412ddc31 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Mon, 24 Jan 2022 21:18:01 +0000 Subject: =?UTF-8?q?Implement=20=E2=8D=BA=E2=8D=B5=E2=8D=B6=E2=8D=B9=20as?= =?UTF-8?q?=20get-set=20variables,=20which=20may=20make=20it=20easier=20to?= =?UTF-8?q?=20do=20TCO=20later.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- operators.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'operators.c') diff --git a/operators.c b/operators.c index c46e627..8feda34 100644 --- a/operators.c +++ b/operators.c @@ -79,8 +79,13 @@ opSwitch(Datum *lefto, Array *left, Array *right) Array * opSelfReference1(Datum *lefto, Array *left, Array *right) { - throwerror(L"∆", ESyntax); - return nil; + DfnFrame *dfn = getcurrentdfn(); + if(dfn) + return rundfn(dfn->code, lefto, nil, left, right); + else{ + throwerror(nil, ESyntax); + return nil; + } } /* Dyadic operators */ @@ -174,6 +179,11 @@ opOver(Datum *lefto, Datum *righto, Array *left, Array *right) Array * opSelfReference2(Datum *lefto, Datum *righto, Array *left, Array *right) { - throwerror(L"⍙", ESyntax); - return nil; + DfnFrame *dfn = getcurrentdfn(); + if(dfn) + return rundfn(dfn->code, lefto, righto, left, right); + else{ + throwerror(nil, ESyntax); + return nil; + } } \ No newline at end of file -- cgit v1.2.3