Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Output codegenerated JavaScript

オープン
#18 コメント 0 件 リアクション 1 件 担当者 1 名 GitHub で見る

まだ誰も着手していません。

  • #19 @copilot-swe-agent による — マージされずにクローズ

評価

この issue はまだ評価されていません。

説明

Now the parser generator codegens JavaScript code and immediately eval()s it. Add ability to output generated JavaScript code to text.

  • Ability to write generated code to text.
  • Ability to write linked dependencies to text.
    • Ability to inline statically literal value dependencies.
    • Do not link raw functions, instead create a shared library of functions. Link it during JIT, but text dump have a version which can be printed to text. I.e. create a "shared library" of functions, which are linked during JIT or dumped to text when full JavaScript code is generated.

Create a shared library, which is statically exported and linked for JIT, but dumped to text in full JavaScript text code generation:

export const sharedLibrary = () => {
  const scrub = () => {};
  class Pattern {}
  class CstMatch {}
  class LeafCstMatch {}
  // ...

  return {
    scrub,
    Pattern,
    CstMatch,
    LeafCstMatch,
  };
};

// For JIT compiler likage:
export const library = sharedLibrary();

// For full code dump:
export const sharedLibraryText = sharedLibrary.toString();
  • Add tests which generate JavaScript parser code, then run it through eval() and sucessfully parse inputs.
主要言語
TypeScript
スター
3
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

streamich/jit-parser のほかの issue

streamich/jit-parser の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。