Support for indexed input data in nested filter/reduce/map expressions

Aperta
#8,561 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java
Ambito
compilers

Direzione di ricerca

Start by tracing how ParserInstance attaches InputData and how nested filter/reduce/map expressions access it; the issue names no files or tests. First decide whether nested sources should be supported with indexable inputs or rejected with a parse error; done means the chosen behavior is implemented and covered by tests for the nested expression example.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Suggestion

Right now, input data (as used in (1 and 2) where [input is 1]) is handled by attaching it to the ParserInstance. However, the attached InputData may contain only one active input source, so nested input sources, for example blocks within ... mapped with [(1 and 2) mapped with ["%integer input% -> %block input%"]], do not work.

We should implement a loop value -like system where input sources can be referenced by their nesting index to single out a specific source, allowing for nested maps and filters among other things.

Why?

Nested maps would be a useful way of handling data and inputs being indexable would bring them in line with what a user familiar with loops would expect

Other

It can be argued that input sources shouldn't be nested and that we don't want to encourage these kinds of practices. In this case it would be better to instead prevent nesting input source expressions in the first place, with a parse error that encourages the user to use a function instead.

Agreement
  • I have read the guidelines above and affirm I am following them with this suggestion.
Lingua principale
Java
Stelle
1.3k
Fork
456
Merge medio
4g 14h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SkriptLang/Skript

Tutte le issue di SkriptLang/Skript

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.