Rename the IO.write method to IO.print, which now prints without a trailing newline, and add a new IO.print method that appends a newline after output. Update all benchmark, example, and test files to use IO.print instead of IO.write. Additionally, implement Unicode escape sequence parsing in the compiler's string tokenizer, supporting \uXXXX and \u{...} syntax with proper UTF-8 encoding for code points up to U+10FFFF.
11 lines
290 B
Plaintext
11 lines
290 B
Plaintext
IO.print(123) // expect: 123
|
|
IO.print(987654) // expect: 987654
|
|
IO.print(0) // expect: 0
|
|
IO.print(-0) // expect: -0
|
|
|
|
IO.print(123.456) // expect: 123.456
|
|
IO.print(-0.001) // expect: -0.001
|
|
|
|
// TODO: Hex? Scientific notation?
|
|
// TODO: Literals at and beyond numeric limits.
|