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.
24 lines
836 B
Plaintext
24 lines
836 B
Plaintext
IO.print(true == true) // expect: true
|
|
IO.print(true == false) // expect: false
|
|
IO.print(false == true) // expect: false
|
|
IO.print(false == false) // expect: true
|
|
|
|
// Not equal to other types.
|
|
IO.print(true == 1) // expect: false
|
|
IO.print(false == 0) // expect: false
|
|
IO.print(true == "true") // expect: false
|
|
IO.print(false == "false") // expect: false
|
|
IO.print(false == "") // expect: false
|
|
|
|
IO.print(true != true) // expect: false
|
|
IO.print(true != false) // expect: true
|
|
IO.print(false != true) // expect: true
|
|
IO.print(false != false) // expect: false
|
|
|
|
// Not equal to other types.
|
|
IO.print(true != 1) // expect: true
|
|
IO.print(false != 0) // expect: true
|
|
IO.print(true != "true") // expect: true
|
|
IO.print(false != "false") // expect: true
|
|
IO.print(false != "") // expect: true
|