+added a customizable identifier alias macro for lambda.
This commit is contained in:
parent
e25bb710c2
commit
d5aa1867ee
3
HISTORY
3
HISTORY
@ -1,3 +1,6 @@
|
|||||||
|
Jun. 17 2017
|
||||||
|
Added a customizable identifier alias macro for lambda
|
||||||
|
|
||||||
Jun. 10 2017
|
Jun. 10 2017
|
||||||
Fixed a processing bug with the ELSE statement, thanks to yukini3 for pointing it out
|
Fixed a processing bug with the ELSE statement, thanks to yukini3 for pointing it out
|
||||||
Avoided warnings with some compilers
|
Avoided warnings with some compilers
|
||||||
|
@ -2124,6 +2124,9 @@ MBCONST static const _func_t _core_libs[] = {
|
|||||||
|
|
||||||
#ifdef MB_ENABLE_LAMBDA
|
#ifdef MB_ENABLE_LAMBDA
|
||||||
{ "LAMBDA", _core_lambda },
|
{ "LAMBDA", _core_lambda },
|
||||||
|
# ifdef MB_ANOTHER_LAMBDA
|
||||||
|
{ MB_ANOTHER_LAMBDA, _core_lambda },
|
||||||
|
# endif /* MB_ANOTHER_LAMBDA */
|
||||||
#endif /* MB_ENABLE_LAMBDA */
|
#endif /* MB_ENABLE_LAMBDA */
|
||||||
|
|
||||||
#ifdef MB_ENABLE_ALLOC_STAT
|
#ifdef MB_ENABLE_ALLOC_STAT
|
||||||
@ -4808,6 +4811,14 @@ static bool_t _is_numeric_char(char c) {
|
|||||||
|
|
||||||
/* Determine whether a character is identifier char */
|
/* Determine whether a character is identifier char */
|
||||||
static bool_t _is_identifier_char(char c) {
|
static bool_t _is_identifier_char(char c) {
|
||||||
|
#if defined MB_ENABLE_LAMBDA && defined MB_ANOTHER_LAMBDA
|
||||||
|
char* p = MB_ANOTHER_LAMBDA;
|
||||||
|
while(*p) {
|
||||||
|
if(c == *p) return true;
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
#endif /* MB_ENABLE_LAMBDA && MB_ANOTHER_LAMBDA */
|
||||||
|
|
||||||
return (
|
return (
|
||||||
(c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
|
(c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
|
||||||
(c == '_') ||
|
(c == '_') ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user