Almenon / Almenon/AREPL-vscode

smarter restart

オープン
#236 コメント 2 件 リアクション 1 件 担当者 1 名 @Almenon が担当を希望しています GitHub で見る
enhancement real-time
主要言語
TypeScript
スター
301
フォーク
46
PR マージ指標
30日以内にマージされた PR はありません

説明

next step: check if the code is actually different before restarting.

For example, adding a space (in most scenarios) will not change the logic of the code, yet AREPL will still think that's an actual change and restart the evaluation. To avoid this I can parse the syntax of the new and old code and check if the syntax trees are the same.

Sample code:

```python
def is_same(code1, code2):
tree = ast.parse(code1)
tree2 = ast.parse(code2)
return ast.dump(tree) == ast.dump(tree2))
```

Avoiding restart is not a big deal with simple programs but with GUI-based on long-running programs it is important.

コントリビューションガイド

コントリビューションガイドを開く

評価

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

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

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