Retoor software development Projects Research SearchXNG
Register Sign In

4 lines
64 B
Plaintext
Raw Normal View History

feat: replace special-cased block call method with primitive and remove source length parameter Remove the `sourceLength` field from the parser and `compile()` signature, switching to null-terminated strings read by `readFile()`. Replace the special `METHOD_CALL` method type with a `block_call` primitive that invokes `callBlock()` on the fiber, and move the `Fiber` and `CallFrame` structs into the public header so primitives can access them. Add a test for block calling via the new primitive.
2013-11-05 16:56:59 +01:00
io.write({ 123 }.call) // expect: 123
feat: add == and != operators for bool, number, and string types with type-checking Implement equality and inequality operators across three primitive types in the compiler and runtime. Add `bool_eqeq`/`bool_bangeq`, `num_eqeq`/`num_bangeq`, and `string_eqeq`/`string_bangeq` primitives that return false/true respectively when comparing against incompatible types. Update the parse rule table with `INFIX_OPERATOR` macros for `TOKEN_EQEQ` and `TOKEN_BANGEQ` at `PREC_COMPARISON` precedence. Include test files `bool_equality.wren`, `number_equality.wren`, and `string_equality.wren` covering cross-type comparisons and edge cases.
2013-11-05 18:57:57 +01:00
// TODO(bob): Arguments.
Reference in New Issue Copy Permalink
cae70590d8
wren/test/block_call.wren
Response time: 28ms
Mail Licenses API