diff options
-rw-r--r-- | lexer.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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] == '{'){ |