diff options
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -186,8 +186,12 @@ term(void) result = fullterm(ParenRightTok, nil, nil); match(ParenRightTok); break; + case StringTok: + result = mkstring(lookahead.text); + match(StringTok); + break; default: - print("Cant parse term of token type %d\n", lookahead.tag); + print("Can't parse term of token type %d\n", lookahead.tag); syntaxerror("term"); result = nil; } @@ -513,6 +517,7 @@ nexttoken(void) numD += (peek - L'0') / (10 * place); peek = Bgetrune(parsein); } + Bungetrune(parsein); /* Should also lex 123.45E10 */ lookahead.tag = FloatTok; lookahead.dval = negative ? -numD : numD; |