From: Brendan Hansen Date: Tue, 22 Sep 2020 04:00:23 +0000 (-0500) Subject: small bugfixes X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=72d94e6f5b21e9106dce0847f104f5a414010f70;p=onyx.git small bugfixes --- diff --git a/core/math.onyx b/core/math.onyx index 2e7e76a1..8fc6e43c 100644 --- a/core/math.onyx +++ b/core/math.onyx @@ -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 1b5c8360..bba7794e 100755 Binary files a/onyx and b/onyx differ diff --git a/src/onyxparser.c b/src/onyxparser.c index 2503d2d4..1d8b2a27 100644 --- a/src/onyxparser.c +++ b/src/onyxparser.c @@ -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];