diff options
| author | gingerBill <bill@gingerbill.org> | 2022-11-08 12:24:00 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-11-08 12:24:00 +0000 |
| commit | a74093784cea3637b445657541cb7fff2f374f50 (patch) | |
| tree | 191dc88360ed5e138de7d163ef13172eecce10e1 /src/check_builtin.cpp | |
| parent | ed58374964889db91b38fe95db409111819790ca (diff) | |
Add `intrinsics.map_cell_info` and `intrinsics.map_info`
Diffstat (limited to 'src/check_builtin.cpp')
| -rw-r--r-- | src/check_builtin.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index 457100d6e..890f7a39b 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -5385,6 +5385,20 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32 operand->type = t_map_info_ptr; break; } + case BuiltinProc_type_map_cell_info: + { + Operand op = {}; + Type *bt = check_type(c, ce->args[0]); + Type *type = base_type(bt); + if (type == nullptr || type == t_invalid) { + error(ce->args[0], "Expected a type for '%.*s'", LIT(builtin_name)); + return false; + } + + operand->mode = Addressing_Value; + operand->type = t_map_cell_info_ptr; + break; + } case BuiltinProc_constant_utf16_cstring: { |