summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lexer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lexer.c b/lexer.c
index 25b5d75..3fd708d 100644
--- a/lexer.c
+++ b/lexer.c
@@ -21,13 +21,18 @@ lexline(Rune *line)
if(isspacerune(line[offset])){
offset++;
continue;
- }else if(runestrchr(L"[]←⋄⍝", line[offset])){
+ }else if(runestrchr(L"[]←⋄⍝⍬", line[offset])){
switch(line[offset]){
case '[': stmt->toks[stmt->ntoks].tag = LBracketTag; break;
case ']': stmt->toks[stmt->ntoks].tag = RBracketTag; break;
case L'←': stmt->toks[stmt->ntoks].tag = ArrowTag; break;
case L'⋄': stmt->next = lexline(&line[offset+1]); goto end;
case L'⍝': goto end;
+ case L'⍬':
+ stmt->toks[stmt->ntoks].tag = ArrayTag;
+ stmt->toks[stmt->ntoks].array = allocarray(AtypeInt, 1, 0);
+ stmt->toks[stmt->ntoks].array->shape[0] = 0;
+ break;
}
offset++;
}else if(line[offset] == '{'){