From 79ab1a4223d53bbdbffc55ae7f9740d953c57945 Mon Sep 17 00:00:00 2001 From: glenda Date: Sat, 22 Oct 2022 19:03:56 +0000 Subject: Prepare for a namespace implementation at some point --- lexer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lexer.c') diff --git a/lexer.c b/lexer.c index 198bd42..244ea3a 100644 --- a/lexer.c +++ b/lexer.c @@ -65,7 +65,7 @@ lexline(InputStream *input, int toplevel) if(isspacerune(peek) && peek != '\n'){ peek = getrune(input); continue; - }else if(runestrchr(L"←⋄\n⍝⍬", peek)){ + }else if(runestrchr(L"←⋄\n⍝⍬#", peek)){ switch(peek){ case L'←': stmt->toks[stmt->ntoks] = allocdatum(ArrowTag, 0); break; case L'\n': @@ -90,6 +90,10 @@ lexline(InputStream *input, int toplevel) stmt->toks[stmt->ntoks]->array = allocarray(AtypeInt, 1, 0); stmt->toks[stmt->ntoks]->array->shape[0] = 0; break; + case L'#': + stmt->toks[stmt->ntoks] = allocdatum(ArrayTag, 0); + stmt->toks[stmt->ntoks]->array = fnSame(rootns); + break; } }else if(!toplevel && peek == ':'){ Rune buf[MAX_LINE_LENGTH]; -- cgit v1.2.3