Changeset 3400 in kBuild for trunk/src/kmk/expreval.c
- Timestamp:
- Jul 2, 2020 11:53:42 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/expreval.c
r3399 r3400 63 63 * operator, omitting isspace. */ 64 64 #define EXPR_IS_OP_SEPARATOR_NO_SPACE(a_ch) \ 65 (ispunct((a_ch)) && (a_ch) != '@' && (a_ch) != '_') )65 (ispunct((a_ch)) && (a_ch) != '@' && (a_ch) != '_') 66 66 67 67 /** Check if @a a_ch is a valid separator for a alphabetical binary operator. */ … … 995 995 996 996 /** 997 * Performs a strlen() on the simplified/converted string argument. 998 * 999 * @returns Status code. 1000 * @param pThis The instance. 1001 */ 1002 static EXPRRET expr_op_strlen(PEXPR pThis) 1003 { 1004 PEXPRVAR pVar = &pThis->aVars[pThis->iVar]; 1005 1006 expr_var_make_simple_string(pVar); 1007 expr_var_assign_num(pVar, strlen(pVar->uVal.psz)); 1008 1009 return kExprRet_Ok; 1010 } 1011 1012 1013 /** 997 1014 * Convert to string (simplified and quoted) 998 1015 * … … 1798 1815 EXPR_OP("bool", 90, 1, expr_op_bool), 1799 1816 EXPR_OP("num", 90, 1, expr_op_num), 1817 EXPR_OP("strlen", 90, 1, expr_op_strlen), 1800 1818 EXPR_OP("str", 90, 1, expr_op_str), 1801 1819 EXPR_OP("+", 80, 1, expr_op_pluss),
Note:
See TracChangeset
for help on using the changeset viewer.