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.
12 lines
281 B
Plaintext
12 lines
281 B
Plaintext
// Unicode characters are allowed in comments.
|
|
//
|
|
// Latin 1 Supplement: £§¶ÜÞ
|
|
// Latin Extended-A: ĐĦŋœ
|
|
// Latin Extended-B: ƂƢƩǁ
|
|
// Other stuff: ឃᢆ᯽₪ℜ↩⊗┺░
|
|
// Emoji: ☃☺♣
|
|
|
|
// TODO: What about combining characters?
|
|
|
|
IO.print("ok") // expect: ok
|