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

Compile list/sexpr values to Veg(Lite) expressions #161

Open
metasoarous opened this issue Aug 8, 2021 · 0 comments
Open

Compile list/sexpr values to Veg(Lite) expressions #161

metasoarous opened this issue Aug 8, 2021 · 0 comments

Comments

@metasoarous
Copy link
Owner

See #119

It would be nice if Oz users could use quotes list sexprs to represent their calculations and filters (etc?) instead of having to write psuedo-JS strings. This may not actually be too hard to support.

The list of operations we have to support are here: https://github.com/vega/vega/blob/master/packages/vega-expression/src/parser.js#L359-L453

Those can be specifically handled, with variadic arity handled by recursively nesting calls to the corresponding operation in the produced JS strings.

if expressions actually translate pretty naturally as with other "function" (ahem) like calls, since there's an if(cond, this, that) expression supported.

Using a keyword in function position can translate to object lookup: (:some-attr datum) => datum["some-attr"].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant