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

分割代入 #512

Merged
merged 4 commits into from
Mar 31, 2024
Merged

分割代入 #512

merged 4 commits into from
Mar 31, 2024

Conversation

FineArchs
Copy link
Member

@FineArchs FineArchs commented Dec 19, 2023

#511 で言った分割代入がとりあえず形になったので申請します。

要改善?

まあいいやと思って申請しましたが、こうしたいという意見があれば直したいと思います。

  • [a, b] = [0]のように要素が足りなかった時はNULLが代入されます。
  • [a, [b]] = [0]のような場合にはExpected array, but got null.のエラーが出ます。
  • 変数宣言と同時に行うことlet [a, b] = [0, 1]はできません。

@FineArchs
Copy link
Member Author

条件を満たしたのでマージします。

@FineArchs FineArchs merged commit f9b4e2a into aiscript-dev:master Mar 31, 2024
4 checks passed
@FineArchs FineArchs deleted the destr-assign branch March 31, 2024 09:12
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.

3 participants