scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 4603a2a279d2bfd1323488d4cb467d6287fed735
parent c231c04f8d22b3b6a46fa49c7da5f7a829380a02
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat,  9 May 2015 17:56:07 +0200

Fix iden()

A valid identifier has _ digits and letters.

Diffstat:
Mcc1/lex.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cc1/lex.c b/cc1/lex.c @@ -367,10 +367,10 @@ string(void) static uint8_t iden(void) { - char c, *p; + char *p; Symbol *sym; - for (p = input->p; isalpha(*p); ++p) + for (p = input->p; isalnum(*p) || *p == '_'; ++p) /* nothing */; input->p = p; tok2str();