-
-
Notifications
You must be signed in to change notification settings - Fork 93
Add semiliteral operator for expressions inside arrays and objects #951
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
base: main
Are you sure you want to change the base?
Add semiliteral operator for expressions inside arrays and objects #951
Conversation
eac3d59 to
23f0dbe
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #951 +/- ##
==========================================
- Coverage 92.78% 92.76% -0.03%
==========================================
Files 107 108 +1
Lines 4739 4794 +55
Branches 1346 1355 +9
==========================================
+ Hits 4397 4447 +50
- Misses 342 347 +5 ☔ View full report in Codecov by Sentry. |
| export type ExpressionParser = (args: ReadonlyArray<unknown>, context: ParsingContext) => Expression; | ||
| export type ExpressionRegistration = { | ||
| new (...args: any): Expression; | ||
| prototype: Expression; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tweaked this because my Semiliteral class is abstract and therefore doesn't have a constructor. If we split semiliteral into two different classes with their own parse like the []/{} proposal, we can revert this line.
| "group": "Types", | ||
| "sdk-support": { | ||
| "basic functionality": { | ||
| "js": "https://github.com/maplibre/maplibre-style-spec/issues/950", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to link to issues in the MapLibre GL JS and MapLibre Native repo so that people can track progress on the implementation.
|
@sargunv any updates on this? It seems that this PR is drifting away a bit... |
|
Ah yeah, I've been focused on maplibre native core stuff and haven't worked on this in a while. Last I remember, we aligned on this general approach in a monthly meeting in May, and next step was to write up some expression naming options and poll the community? I'll propose some names with background/justification and share in Slack soon |
|
Yes, I think that was the last action item on this topic. |
Description
The purpose of this PR is to add support for producing arrays with elements calculated by expressions. It's a draft implementation of #950.
I implemented it as a single
semiliteraloperator mirroring theliteralsyntax, like other lisps have quasiquote and quote. Happy to restructure this into[]/{}or some other name as discussed in that design proposal.Launch Checklist
CHANGELOG.mdunder the## mainsection.