1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-01-05 02:30:56 +00:00

Add ARRAY? predicate

This commit is contained in:
David Schmenk 2024-08-02 08:09:57 -07:00
parent f77c0e9a9e
commit 3d149b668c
2 changed files with 6 additions and 0 deletions

Binary file not shown.

View File

@ -1299,6 +1299,11 @@ end
// Arrays
//
def natv_arrayp(symptr, expr)
expr = eval_expr(expr=>car)
return bool_pred(expr and expr->type == ARRAY_TYPE)
end
def eval_index(arrayptr, expr)
var idx[4], i, ii, index
@ -1658,6 +1663,7 @@ new_sym("NULL")=>natv = @natv_null
new_sym("FUNCTION")=>natv = @natv_function
new_sym("DEFINE")=>natv = @natv_define
new_sym("ARRAY")=>natv = @natv_array
new_sym("ARRAY?")=>natv = @natv_arrayp
new_sym("CSET")=>natv = @natv_cset
new_sym("CSETQ")=>natv = @natv_csetq
new_sym(":=")=>natv = @natv_csetq