summaryrefslogtreecommitdiff
path: root/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lexer.c b/lexer.c
index 626d181..303951d 100644
--- a/lexer.c
+++ b/lexer.c
@@ -4,8 +4,6 @@
#include "apl9.h"
-Rune primhybridnames[] = L"/\⌿⍀";
-
Statement *
lexline(Rune *line, int toplevel)
{
@@ -101,6 +99,10 @@ lexline(Rune *line, int toplevel)
stmt->toks[stmt->ntoks].operator.dyadic = 1;
stmt->toks[stmt->ntoks].operator.code = p-primdyadopnames;
offset++;
+ }else if(p = runestrchr(primhybridnames, line[offset])){
+ stmt->toks[stmt->ntoks].tag = HybridTag;
+ stmt->toks[stmt->ntoks].hybrid = p-primhybridnames;
+ offset++;
}else if(isdigitrune(line[offset]) || (line[offset] == L'¯' && isdigitrune(line[offset+1]))){
char buf[64];
char *p = buf;