aboutsummaryrefslogtreecommitdiff
path: root/src/exact_value.cpp
diff options
context:
space:
mode:
authorGinger Bill <github@gingerbill.org>2016-08-19 15:35:48 +0100
committerGinger Bill <github@gingerbill.org>2016-08-19 15:35:48 +0100
commit745237459abb3fa91405fdba3895bd9f810bc9d2 (patch)
tree63b2396f1bea12a4cfdf3a334f82a31c9dd28ec0 /src/exact_value.cpp
parentddb15e73c0f378b5d65675ba242e505fb1a3b2f2 (diff)
Initial Demo001 code for tour of language
Diffstat (limited to 'src/exact_value.cpp')
-rw-r--r--src/exact_value.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/exact_value.cpp b/src/exact_value.cpp
index b774d8656..f428c9834 100644
--- a/src/exact_value.cpp
+++ b/src/exact_value.cpp
@@ -108,6 +108,8 @@ ExactValue exact_value_to_integer(ExactValue v) {
return v;
case ExactValue_Float:
return make_exact_value_integer(cast(i64)v.value_float);
+ case ExactValue_Pointer:
+ return make_exact_value_integer(cast(i64)cast(intptr)v.value_pointer);
}
ExactValue r = {ExactValue_Invalid};
return r;