diff options
| author | gingerBill <bill@gingerbill.org> | 2018-08-26 15:10:23 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-08-26 15:10:23 +0100 |
| commit | e5735af6d6001a2a8b8df08d45ac1778dcc7b6f3 (patch) | |
| tree | 78363f533306d293e0a384c83ee9dfb9f6373cdc /src/exact_value.cpp | |
| parent | a6b0ae71b2795948976c74ca1e8fbf480b731f89 (diff) | |
Disable for in over cstring
Diffstat (limited to 'src/exact_value.cpp')
| -rw-r--r-- | src/exact_value.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/exact_value.cpp b/src/exact_value.cpp index 30d4fd649..fb392c831 100644 --- a/src/exact_value.cpp +++ b/src/exact_value.cpp @@ -141,6 +141,8 @@ ExactValue exact_value_integer_from_string(String const &string) { return result; } + + f64 float_from_string(String string) { isize i = 0; u8 *str = string.text; @@ -296,6 +298,16 @@ ExactValue exact_value_to_integer(ExactValue v) { return r; } +i64 exact_value_to_i64(ExactValue v) { + v = exact_value_to_integer(v); + i64 result = 0; + if (v.kind == ExactValue_Integer) { + return big_int_to_i64(&v.value_integer); + } + return result; +} + + ExactValue exact_value_to_float(ExactValue v) { switch (v.kind) { case ExactValue_Integer: |