Unicode literal to C like character literal

This commit is contained in:
Krzosa Karol
2022-09-27 10:21:19 +02:00
parent 4f51749787
commit fef98220ba
5 changed files with 20 additions and 14 deletions

View File

@@ -85,7 +85,7 @@ itoa :: (value: S64, result: *U8, base: S64): *U8
// Apply negative sign
if tmp_value < 0
*ptr++ = '- // '
*ptr++ = '-'
*ptr-- = 0
for ptr1 < ptr
tmp_char = *ptr
@@ -100,7 +100,7 @@ print :: (string: String, args: ..)
arg_counter := 0
for i := 0, i < length_of(string), i+=1
if string[i] == '% // '
if string[i] == '%'
assert(arg_counter < length_of(args), "Passing too many [%] to a print lambda")
arg := args[arg_counter++]