True for single-argument functions that transform a scalar string value * (vs. entity-introspection funcs that act on the bound node/edge). */
| 1478 | /* True for single-argument functions that transform a scalar string value |
| 1479 | * (vs. entity-introspection funcs that act on the bound node/edge). */ |
| 1480 | static bool is_scalar_value_func(const char *f) { |
| 1481 | return f && (strcmp(f, "toLower") == 0 || strcmp(f, "toUpper") == 0 || |
| 1482 | strcmp(f, "toString") == 0 || strcmp(f, "toInteger") == 0 || |
| 1483 | strcmp(f, "toFloat") == 0 || strcmp(f, "toBoolean") == 0 || |
| 1484 | strcmp(f, "size") == 0 || strcmp(f, "length") == 0 || strcmp(f, "trim") == 0 || |
| 1485 | strcmp(f, "ltrim") == 0 || strcmp(f, "rtrim") == 0 || strcmp(f, "reverse") == 0); |
| 1486 | } |
| 1487 | |
| 1488 | static int parse_var_dot_prop(parser_t *p, cbm_return_item_t *item) { |
| 1489 | const cbm_token_t *var = expect(p, TOK_IDENT); |