mirror of
https://github.com/samba-team/samba.git
synced 2025-12-14 20:23:54 +03:00
r11084: - allow hex numbers with 'a'...'f' digits to be parsed
- parse hex numbers correct tridge: how could we submit this to the upstream appweb library? metze
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
5d46cdd1ee
commit
70cde83c13
@@ -633,12 +633,19 @@ static int getLexicalToken(Ejs *ep, int state)
|
||||
break;
|
||||
}
|
||||
if (tolower(c) == 'x') {
|
||||
if (tokenAddChar(ep, c) < 0) {
|
||||
return EJS_TOK_ERR;
|
||||
}
|
||||
if ((c = inputGetc(ep)) < 0) {
|
||||
break;
|
||||
}
|
||||
do {
|
||||
if (tokenAddChar(ep, c) < 0) {
|
||||
return EJS_TOK_ERR;
|
||||
}
|
||||
if ((c = inputGetc(ep)) < 0) {
|
||||
break;
|
||||
}
|
||||
} while (isdigit(c) || (tolower(c) >= 'a' && tolower(c) <= 'f'));
|
||||
|
||||
mprDestroyVar(&ep->tokenNumber);
|
||||
ep->tokenNumber = mprParseVar(ep->token, type);
|
||||
inputPutback(ep, c);
|
||||
return EJS_TOK_NUMBER;
|
||||
}
|
||||
if (! isdigit(c)) {
|
||||
#if BLD_FEATURE_FLOATING_POINT
|
||||
|
||||
Reference in New Issue
Block a user