Picolab / Picolab/pico-engine

Idea: local block before a rule's select statement

Open
#237 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement new language feature
Dominant language
TypeScript
Stars
51
Forks
10
Avg merge
4m
Merged PRs (30d)
1

Description

Functions and variables are useful in select statements (attribute expressions) and foreach's (array or map expressions), both of which occur before the prelude can be used to name otherwise redundant computations.

Concretely, @cgrimm013 and I encountered situations where we wanted to define functions by the rules whose foreach's used them, but we had to define them in the global block, which can be very far away from the only rules that need them.

Function definitions already support context-sensitive things like event:attr.

An almost identical alternative would be to allow definitions between rules, instead of in a special block.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. First locate the rule parser and evaluator, then determine how a local block before a rule's select or foreach should interact with the existing global block and prelude; done requires an agreed syntax and behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.