Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return Key #245

Open
robcxyz opened this issue Jan 1, 2024 · 0 comments
Open

Return Key #245

robcxyz opened this issue Jan 1, 2024 · 0 comments
Labels
proposal Proposal for changes in syntax / behaviour wip A work in progress proposal

Comments

@robcxyz
Copy link
Collaborator

robcxyz commented Jan 1, 2024

Return Key

Create a special key for returning the value when parsing

Overview

Blocked by return-hook

Currently when a declarative hook is called with an exec, the entire context is parsed with a special field for returning the appropriate value (return) being used to specify what the result is of that parsing.

This proposal would modify the parsing behaviour so that special keys can be used to indicate whether a variable is returned.

Examples

Normal parsing

foo: bar

return->: return {{foo}}

Macros

foo: bar

return->: return {{foo}}

Then move to using return hook.

foo: bar

tmp:

  ->: return {{foo}}
@robcxyz robcxyz changed the title tmp Return Key Jan 1, 2024
@robcxyz robcxyz added proposal Proposal for changes in syntax / behaviour wip A work in progress proposal labels Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Proposal for changes in syntax / behaviour wip A work in progress proposal
Projects
None yet
Development

No branches or pull requests

1 participant