small bugfixes
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 22 Sep 2020 04:00:23 +0000 (23:00 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 22 Sep 2020 04:00:23 +0000 (23:00 -0500)
core/math.onyx
onyx
src/onyxparser.c

index 2e7e76a1965c97e364c0d1c1434510f0ef9846a1..8fc6e43c7eac04fdb16342c14c11c9443075a764 100644 (file)
@@ -57,3 +57,7 @@ min_poly :: proc (a: $T, b: T) -> T {
     if a <= b do return a;
     return b;
 }
+
+sqrt_i32 :: proc (x: i32) -> i32 {
+    return ~~sqrt_f32(~~x);
+}
diff --git a/onyx b/onyx
index 1b5c8360fdde28a21badea338c7e0b438ef66811..bba7794e52e705e0c38c00ea8f08db022a93f1f8 100755 (executable)
Binary files a/onyx and b/onyx differ
index 2503d2d4634f65db194b595c260d25e325c12c39..1d8b2a270827dc5191e5b930cae92199f04d0b04 100644 (file)
@@ -508,6 +508,7 @@ static AstTyped* parse_factor(OnyxParser* parser) {
                         case 'r': char_lit->value.i = '\r'; break;
                         case 'v': char_lit->value.i = '\v'; break;
                         case 'e': char_lit->value.i = '\e'; break;
+                        case '"': char_lit->value.i = '"'; break;
                         case 'x': {
                             // HACK: This whole way of doing this
                             u8 buf[3];