Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: REPLの機能強化 #850

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

takejohn
Copy link
Contributor

What

  • console.jsをscripts/repl.mjsに移動し、npm run replでREPLを実行できるようにします。
  • REPLが実行されている間、グローバル変数が保存されるようにします。
  • 入力行を構文解析するとunexpected EOFエラーになる場合、複数行の入力を受け付けるようになります。
  • 終了コマンドを.exitに変更します。

Why

Resolve #849

Additional info (optional)

複数行の入力に対応するため、AiScriptSyntaxErrorのサブクラスAiScriptUnexpectedEOFErrorクラスを作成しました。

@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 59.64912% with 23 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/parser/syntaxes/common.ts 30.00% 7 Missing ⚠️
src/parser/scanner.ts 37.50% 5 Missing ⚠️
src/parser/syntaxes/expressions.ts 81.25% 3 Missing ⚠️
src/error.ts 60.00% 2 Missing ⚠️
src/parser/syntaxes/statements.ts 33.33% 2 Missing ⚠️
src/parser/syntaxes/toplevel.ts 50.00% 2 Missing ⚠️
src/parser/streams/token-stream.ts 50.00% 1 Missing ⚠️
src/parser/utils.ts 88.88% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files with missing lines Coverage Δ
src/parser/streams/token-stream.ts 81.03% <50.00%> (+17.58%) ⬆️
src/parser/utils.ts 97.14% <88.88%> (-2.86%) ⬇️
src/error.ts 89.55% <60.00%> (+3.18%) ⬆️
src/parser/syntaxes/statements.ts 97.35% <33.33%> (+4.09%) ⬆️
src/parser/syntaxes/toplevel.ts 96.15% <50.00%> (-2.41%) ⬇️
src/parser/syntaxes/expressions.ts 93.09% <81.25%> (+3.91%) ⬆️
src/parser/scanner.ts 94.16% <37.50%> (+5.39%) ⬆️
src/parser/syntaxes/common.ts 90.28% <30.00%> (+0.75%) ⬆️

... and 24 files with indirect coverage changes

scripts/repl.mjs Outdated Show resolved Hide resolved
Co-authored-by: salano_ym <53254905+salano-ym@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REPLの機能強化
4 participants