Skip to content

Conversation

@takejohn
Copy link
Member

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@takejohn takejohn merged commit ce845b1 into aiscript-dev:master Nov 17, 2024
4 checks passed
@takejohn takejohn deleted the feat/849_repl-enhancement branch November 17, 2024 03:20
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