From e5735af6d6001a2a8b8df08d45ac1778dcc7b6f3 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 26 Aug 2018 15:10:23 +0100 Subject: Disable for in over cstring --- src/exact_value.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/exact_value.cpp') 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: -- cgit v1.2.3