Quoting/Unquoting lispy-like macro feature for instruction#14
Open
SerhiiRI wants to merge 1 commit into
Open
Conversation
- ADDED New builtin command-quote-spec support :commando/quote + :commando/unquote behavior in one specyfication - ADDED dependency mode :quote.
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.
ADDED
command-quote-specincommando.commands.builtin— a new command type:commando/quote(string form"commando-quote") that brings Lisp-style quasiquote semantics to instructions. A:commando/quotebody is treated as inert data: commands inside it are NOT executed and the scanner stops descending — except inside:commando/unquoteholes (string form"commando-unquote"), which ARE executed and whose results are substituted back into the body.:commando/unquoteis pure syntax recognized only inside a quote — it is not a registered command and has no special meaning outside a quote.:commando/quotestays fully inert (its wrapper is left untouched), so quotes can be nested safely.:commando/fromand other commands inside an:commando/unquoteresolve against the full instruction, so unquote holes can reference values outside the quote.:commando/frompointing at a quote node receives the expanded (unquoted) body.ADDED dependency mode
:quoteincommando.impl.dependency— internal mode used bycommand-quote-spec. Dependencies are collected from the quote sub-trie but are only visible through:finding-commands-unquote-keys; the scanner halts at:finding-commands-skip-keys(nested quotes). Supported public modes remain:point,:all-inside,:none.Example