diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-05-31 14:53:10 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-05-31 14:53:10 -0700 |
commit | 3297ca7f3a3313e80e49547c857e1593286316b8 (patch) | |
tree | e3fc9e24e7ca89be75c1d1981107de8a01d0fe61 /sys/cmd/cc/lex.c | |
parent | b6291927ffb898e37fd482b08669b3577e4d669a (diff) |
minor changes
Diffstat (limited to 'sys/cmd/cc/lex.c')
-rw-r--r-- | sys/cmd/cc/lex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cmd/cc/lex.c b/sys/cmd/cc/lex.c index 97e19e4..1396358 100644 --- a/sys/cmd/cc/lex.c +++ b/sys/cmd/cc/lex.c @@ -32,7 +32,6 @@ Io* openio(Lexer *lx, byte *path) { string *it, *end; - Stream *f; intern(&path); @@ -441,7 +440,7 @@ Dispatch: else { r = v; b = utf8·runelen(r); - utf8·runetochar(lx->buf, &r); + utf8·runetobyte(lx->buf, &r); str·appendlen(&s, b, lx->buf); } } @@ -725,7 +724,7 @@ Dispatch: if (!utf8·isletter(r) && !utf8·isdigit(r) && r != 0xb7) { errorat(lx->pos, "invalid identifier character %d", r); } - s += utf8·runetochar(s, &r); + s += utf8·runetobyte(s, &r); } else if (!isalnum(b) && b != '_') break; else @@ -778,6 +777,7 @@ Return: Nospace: panicf("aborting compilation"); + exit(1); } #undef CASE4 |