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

valToStrへのtype 'return'の文字列追加 #268

Closed
tai-cha opened this issue May 12, 2023 · 2 comments · Fixed by #844 · May be fixed by #269
Closed

valToStrへのtype 'return'の文字列追加 #268

tai-cha opened this issue May 12, 2023 · 2 comments · Fixed by #844 · May be fixed by #269

Comments

@tai-cha
Copy link
Contributor

tai-cha commented May 12, 2023

PlaygroundやMisskey内のスクラッチパッドで最後に評価されたものが出力される機能があるがreturnを使った場合は必ずreturn<null>になってしまう

Playground、MisskeyのスクラッチパッドはどちらもutillのvalToStrを利用しているようなのでreturnに対してlabelなど設定すればよさそう

simpleの時は返す値をそのまま、そうでなければ return<任意のvalue文字列>になるような挙動でよさそうなら手元で試したものがあるのでPRにします

@tai-cha tai-cha changed the title return のvalToStrの追加 valToStrへのtype returnの文字列追加 May 12, 2023
@tai-cha tai-cha changed the title valToStrへのtype returnの文字列追加 valToStrへのtype 'return'の文字列追加 May 12, 2023
tai-cha added a commit to tai-cha/aiscript that referenced this issue May 12, 2023
@salano-ym
Copy link
Member

returnが残らないようにするのが根本的解決かも? #237

@tai-cha
Copy link
Contributor Author

tai-cha commented May 13, 2023

ブロック内以外のreturnも値のほうが表示されて欲しさはあるような…?

@ikasoba ikasoba added the enhancement New feature or request label Aug 30, 2023
@marihachi marihachi added interpreter and removed enhancement New feature or request labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants