summaryrefslogtreecommitdiff
path: root/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c6
1 files changed, 5 insertions, 1 deletions
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];