diff options
author | ubq323 <ubq323@ubq323.website> | 2024-08-06 18:12:16 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-08-06 18:12:16 +0100 |
commit | 5b522325bdc0af283ca6d3ec7d71908858d91b33 (patch) | |
tree | e2944b3db088fbb4b48dac71365928c628ef30dd /val.c | |
parent | a266b97829ebe698a4256890fdf1214e479fe1de (diff) |
deastnodeify form compilers
Diffstat (limited to 'val.c')
-rw-r--r-- | val.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -184,3 +184,10 @@ const char *typename_str(Val v) { } return "???"; } + +int val_type(Val v) { + if (IS_OBJ(v)) + return AS_OBJ(v)->oty; + else + return v.ty; +} |