mitranim / mitranim/jisp

Printing jisp code back after macroexpand

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

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
132
Forks
9
PR merge metrics
No merged PRs in 30d

Description

There needs to be a way to return jisp code after parsing and expanding all macros, but before compiling. This must be available as a compiler option, and in the REPL.

This requires implementing jisp printing and beautification. Blindly printing the code back, as a single line, should be trivial. Indenting should also be simple: in the simplest form, it’s 2 extra spaces per each level of nesting. Not sure how to decide where to put linebreaks. ToDo figure it out and implement.

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

Start at the compiler option handling and REPL entry points, then trace the stage after macro expansion and before compilation. Done means expanded jisp can be printed and beautified through the compiler option and in the REPL, with a defined approach to indentation and line breaks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.