diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-05-25 19:17:57 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-05-25 21:02:40 +0200 |
commit | 5879bdf94fa8f899a1961f6eb5fbc4aacfa84b2a (patch) | |
tree | fe91228a2b8e9636a8f7b58ca09d3b3d1332460d /lib.c | |
parent | d4edadc839bd0b5a1345c9f5a42dd8a8d0cdf4f1 (diff) |
syntax: drop Infinity and NaN keywords
Turn the Infinity and NaN keywords into global properties.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2601,6 +2601,10 @@ uc_alloc_global(uc_vm *vm) ucv_object_add(global, "REQUIRE_SEARCH_PATH", arr); + /* register global math constants */ + ucv_object_add(global, "NaN", ucv_double_new(NAN)); + ucv_object_add(global, "Infinity", ucv_double_new(INFINITY)); + /* register global property */ ucv_object_add(global, "global", ucv_get(global)); |