diff options
Diffstat (limited to 'cppawk-include')
-rw-r--r-- | cppawk-include/cons-priv.h | 12 | ||||
-rw-r--r-- | cppawk-include/cons.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/cppawk-include/cons-priv.h b/cppawk-include/cons-priv.h index d9a8e28..0dd794d 100644 --- a/cppawk-include/cons-priv.h +++ b/cppawk-include/cons-priv.h @@ -159,6 +159,18 @@ function __numberp(__obj) } #define __numberp(obj) (obj != "" && ((obj) == 0 || (obj) + 0 != 0)) +function __stringp(__obj) +{ + return __typecode(obj) == "T" +} +#define __stringp(obj) (substr(obj, 1, 1) == "T") + +function __symbolp(__obj) +{ + return __typecode(obj) ~ /^S?$/ +} +#define __symbolp(obj) (substr(obj, 1, 1) ~ /^S?$/) + function __box(__raw, __case_temps) { diff --git a/cppawk-include/cons.h b/cppawk-include/cons.h index 1879e18..57e23c6 100644 --- a/cppawk-include/cons.h +++ b/cppawk-include/cons.h @@ -53,6 +53,8 @@ #define false __false #define true __true #define numberp __numberp +#define stringp __stringp +#define symbolp __symbolp #define box __box #define unbox __unbox #define box_sym __box_sym |