mProjectsCode / mProjectsCode/parsiNOM

Big Internal Change Idea

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Currently, parsers are constructed like this: Parser((context) => { ... }) and they simply access the other parsers via the scope of the lambda.

The idea is to provide more info to the parser instance for analysis (e.g. finding infinite loops).

const p = new Parser({
    type: SOME_ENUM.VALUE,
    advancing?: ADVANCING | UNKNOWN | NOT_ADVANCING,
    deps: [Parser1, Parser2].
});

p.func = function some_name(context) => {
    const parser1 = p.getDep(0); // this has the correct type (Parser1)
}

This allows for a validation function on the parser that checks for infinite loops.
This also enables building a string representation of the parser structure.

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 or tests; start by locating the current Parser constructor and the lambda-based dependency access. Read how parser instances are represented and how their functions are assigned. Done would require an agreed parser metadata and dependency design, validation for infinite loops, and a string representation of parser structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
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.