V2#38
Merged
Merged
Conversation
…re parentheses in function calls.
…ze bytecode structure, and enhance test coverage.
…tch` function in VM, and integrate `ohm` grammar compilation process
…update grammar, compiler, VM, and tests accordingly
…ng `>`, `<`, `>=`, `<=`, `==`, and `!=`
…and tests, along with precedence and keyword collision handling.
… update grammar, compiler, parser, and tests accordingly.
…paring for updated implementation.
…am termination, and refactor stack handling.
…nts into assignment expressions, and update bundle definitions.
…tilities for cleaner test assertions.
…mmar, update bytecode with `JMP` opcode, and simplify type definitions in generated parser bundle.
… jump instructions and targets, and add comprehensive tests for behavior.
…ion with conditional jumps (`JMP_IF_ZERO`), remove `AND` and `OR` opcodes, and update tests and README accordingly.
… compiler, update parser bundle types, and implement loop-related bytecode instructions.
…pass compilation, and frame-based VM. Update grammar, bytecode, and tests.
- Introduce array literals (`[]`, `[e1, ...]`), indexed read/write (`arr[i] = x`), and mutators (`push`, `pop`, etc.). - Add new `Value` kind (`array`), VM opcodes (`MAKE_ARRAY`, `INDEX_GET`, ...), and runtime checks. - Update grammar, AST, compiler, and runtime to support arrays. - Include tests and roadmap updates for arrays.
…indexing, and mutators
…ing support - Introduce `none` and boolean (`true`/`false`) Value kinds with singletons (`NONE_VALUE`, `TRUE_VALUE`, `FALSE_VALUE`). - Canonicalize truthiness rule: only `none` and `false` are falsy; update `if`/`while`/`not` behavior. - Replace `JMP_IF_ZERO` with `JMP_IF_FALSY`. - Update comparison operators (`==`, `!=`, `<`, `>`, etc.) and `not` to return booleans (`true`/`false`) instead of numbers (`0`/`1`). - Enable negative array indexing (`arr[-1]`) with wrapping for indexed reads and writes; OOB reads return `none`, writes raise `TypeMismatch`. - Modify grammar, AST, compiler, VM
…olUse` hook and manual regeneration instructions
…s for `none`/`true`/`false`, and ensure exhaustive `switch` guards in specs and runtime
…ith `NoneValue` and `BooleanValue` kinds and singletons, and update truthiness handling
…ime state handling, and replace inline swaps with encapsulated methods.
… `by` literal step, `break`/`continue` compatibility, and compile-time rejection of `by 0`.
…, and @ohm-js/cli dependency
…`len`, and `str` built-ins; extend constant pool, opcodes, and feature tests
…constant pool for deduplication of numeric literals.
…ents.test.ts`, `functions.test.ts`) to align with updated directory structure.
…`stringValue` constructor function
…introduce `args` global, and implement `num` built-in for numeric string conversion
…-in; add CLI tests, fixtures, and error handling logic
…ER_NEXT_OR_END` opcodes, and `ArrayIter` implementation; update `for-in` lowering and tests.
…ge loop state, enforce `JMP` type for loop-control jumps, and update related compiler logic and tests
…ive (`...`) range operators, supporting optional `step` keyword.
…Args`, `Params`) using new `ListSep` production.
…` type and construction; update grammar file.
…ethods, and enforce fail-fast access - Introduced `PropertyAccess` grammar and AST node for `expr.ident` syntax. - Added `GET_PROPERTY` opcode and a per-kind method registry in the runtime. - Replaced global functions like `len`, `push`, `num` with methods (e.g., `arr.length`, `arr.push()`, `"123".to_number()`). - Introduced `bound_native` Value kind for bound methods. - Enforced strict out-of-bounds and missing property access with `IndexError` and `NoSuchProperty`. - Updated tests, documentation, and examples for the new behavior and API. - Removed outdated globals and improved runtime consistency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.