Add debug symbols for global constants of integers, bools, enums, runes, & pointers.

Variables are namespaced with `pkg::name` or `name` if built-in or the initial package for convenience.
This commit is contained in:
gingerBill
2022-11-02 00:05:51 +00:00
parent 382bd87667
commit 3b583cbac7
3 changed files with 147 additions and 0 deletions

View File

@@ -499,6 +499,13 @@ i64 exact_value_to_i64(ExactValue v) {
}
return 0;
}
u64 exact_value_to_u64(ExactValue v) {
v = exact_value_to_integer(v);
if (v.kind == ExactValue_Integer) {
return big_int_to_u64(&v.value_integer);
}
return 0;
}
f64 exact_value_to_f64(ExactValue v) {
v = exact_value_to_float(v);
if (v.kind == ExactValue_Float) {