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

feat(air): embedded Starlark script support #853

Open
wants to merge 36 commits into
base: master
Choose a base branch
from

Conversation

monoid
Copy link
Contributor

@monoid monoid commented Jul 31, 2024

  1. Add a Starlark interpreter with redefined fail(code, message) function call, and get_value(N) and get_tetraplet(N) functions.
  2. Add new embed [args] #" starlark-script "# optional-output instruction.

monoid added 19 commits August 1, 2024 00:02
Guarded by `starlark` feature flag.
Make it more compatible with AquaVM approach
Make `Fail` one of variants of the `ExecutionResult`, not a nested result.
Everything between `(#` and `#)` is considered an embedded script.  The
script itself is not analyzed.
As theoretically many tetraplets may be associated with a value,
we return all of them instead of just one.
This reverts commit 3300d87.

It seems to be more convenient to work with typed result in the AquaVM.
@monoid monoid added the A-air-interpreter area: air-interpreter label Jul 31, 2024
@monoid monoid requested review from mikevoronov and raftedproc July 31, 2024 22:07
@monoid monoid self-assigned this Jul 31, 2024
Copy link

linear bot commented Jul 31, 2024

@monoid
Copy link
Contributor Author

monoid commented Jul 31, 2024

The embed instruction should be documented.

monoid added 5 commits August 1, 2024 12:59
1. `EmbedString` is removed from lexer
2. `#".."#` is parsed as a string.  It can contain quotation marks and
    hash signs inside, but `"#` combination ends it.

The raw strings can be used everywhere where string can be used.

`(#...#)` cannot be used because it can exist in real code (for example,
canon stream in call triplet).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-air-interpreter area: air-interpreter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant