summaryrefslogtreecommitdiffhomepage
path: root/value.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-05-18 10:45:21 +0200
committerJo-Philipp Wich <jo@mein.io>2021-05-18 13:11:33 +0200
commitff6811f29065951ab3917460f3d76ffe6ddb0c81 (patch)
tree7d3925b2640c9dfc07959faaf866699d77a30d00 /value.h
parent5803d8605b84ef362cc7f96f9e523eff5d0d81bc (diff)
syntax: implement `delete` as proper operator
Turn `delete` into a proper operator mimicking ECMAScript semantics. Also ensure to transparently turn deprecated `delete(obj, propname)` function calls into `delete obj.propname` expressions during compilation. When strict mode is active, legacy delete() calls throw a syntax error instead. Finally drop the `delete()` function from the stdlib as it is shadowed by the delete operator syntax now. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'value.h')
-rw-r--r--value.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/value.h b/value.h
index a3abfc6..7d4e2b1 100644
--- a/value.h
+++ b/value.h
@@ -48,6 +48,7 @@ uc_type_t uc_cast_number(uc_value_t *v, int64_t *n, double *d);
uc_value_t *uc_getval(uc_vm *, uc_value_t *scope, uc_value_t *key);
uc_value_t *uc_setval(uc_vm *, uc_value_t *scope, uc_value_t *key, uc_value_t *val);
+bool uc_delval(uc_vm *, uc_value_t *scope, uc_value_t *key);
void uc_vallist_init(uc_value_list *list);
void uc_vallist_free(uc_value_list *list);