bydgoszcz

simple, fast and efficient programming language
git clone git://git.kocotian.pl/bydgoszczscript.git
Log | Files | Refs | README | LICENSE

commit ba179d07f98485c08f6818d0cfbc1aa5ab9eeafa
parent e8717c39db489ff6f963eb0188294f25430e9dfc
Author: kocotian <kocotian@kocotian.pl>
Date:   Fri, 28 May 2021 11:21:03 +0200

Identifiers with underscore

Diffstat:
Mtoken.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/token.c b/token.c @@ -51,12 +51,14 @@ nextToken(File *f) return NULL; /* Identifier */ else if ((CURCHAR >= 'a' && CURCHAR <= 'z') - || (CURCHAR >= 'A' && CURCHAR <= 'Z')) { + || (CURCHAR >= 'A' && CURCHAR <= 'Z') + || (CURCHAR == '_')) { TYPE(TokenIdentifier); ++i; while (((CURCHAR >= 'a' && CURCHAR <= 'z') || (CURCHAR >= 'A' && CURCHAR <= 'Z') - || (CURCHAR >= '0' && CURCHAR <= '9')) + || (CURCHAR >= '0' && CURCHAR <= '9') + || (CURCHAR == '_')) && NOT_OVERFLOW) ++i; } /* Number */