Conversation
schungx
force-pushed
the
main
branch
2 times, most recently
from
September 21, 2026 09:39
e211101 to
8a0f5ed
Compare
schungx
force-pushed
the
vm-support-custom-syntax
branch
3 times, most recently
from
September 21, 2026 14:21
90df3c8 to
b21221b
Compare
schungx
force-pushed
the
vm-support-custom-syntax
branch
from
September 21, 2026 14:30
b21221b to
8a0f5ed
Compare
schungx
force-pushed
the
vm-support-custom-syntax
branch
from
September 21, 2026 15:14
37342b5 to
ce9b758
Compare
schungx
force-pushed
the
vm-support-custom-syntax
branch
from
September 21, 2026 15:24
ce9b758 to
09d85a0
Compare
Collaborator
Author
|
@ImTheSquid Finally got all the CI tests to pass and all the feature combinations properly gated! Pls take a read thru this... This look like a larger PR but really not so. One new opcode, one new pool, and the relevant implementation. All other file changes are properly gating the |
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.
Introduction
Custom syntax is a unique feature of Rhai, one used by many domain-specific applications to simplify code by providing new syntax suited to the domain usage.
Grain Support
Previously, Grain rejects all custom syntax as fragments. This PR adds support for custom syntax that does not touch the
scope.Custom syntax that touches the
scope, likeeval, remain non-lowerable. These cases are extremely rare.Implementation
Grain implements custom syntax via a new Opcode
Op::CustomSyntaxand acustom_syntaxpool.no_astFinally,
no_astworks with custom syntax, disabling only the parser half of it, but allows the execution part to work with Grain.