diff --git a/HISTORY b/HISTORY index 8dccc60..50880db 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Jun. 17 2017 +Added a customizable identifier alias macro for lambda + Jun. 10 2017 Fixed a processing bug with the ELSE statement, thanks to yukini3 for pointing it out Avoided warnings with some compilers diff --git a/core/my_basic.c b/core/my_basic.c index 1ced6d7..68e24c6 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -2124,6 +2124,9 @@ MBCONST static const _func_t _core_libs[] = { #ifdef MB_ENABLE_LAMBDA { "LAMBDA", _core_lambda }, +# ifdef MB_ANOTHER_LAMBDA + { MB_ANOTHER_LAMBDA, _core_lambda }, +# endif /* MB_ANOTHER_LAMBDA */ #endif /* MB_ENABLE_LAMBDA */ #ifdef MB_ENABLE_ALLOC_STAT @@ -4808,6 +4811,14 @@ static bool_t _is_numeric_char(char c) { /* Determine whether a character is identifier char */ 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 ( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_') ||