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

add new block for fstring #56

Open
hloi opened this issue May 24, 2023 · 1 comment
Open

add new block for fstring #56

hloi opened this issue May 24, 2023 · 1 comment

Comments

@hloi
Copy link

hloi commented May 24, 2023

Hello, how would I go about to add a new fstring block for the print function. Right now I add a new checkbox to the List and convert it to a fstring format when the checkbox is checked.
It works fine in this approach except that I won't able to reload the code back to the Blockly canvas for the list.
Also, when I create a new Block such as fstring, I don't know how to add it to BlockMirror. I add f" or fstring(___) in the toolbox.js but I don't know how to tie it to ast_fstring.js to customize the fstring function.
Any suggestion would be greatly appreciated.

@hloi
Copy link
Author

hloi commented May 27, 2023

Hello, I'm attempting to add the following expression: print(f'this is a test num') using fstring for the print command. I attempted to edit toolbars.js, but it did not work. Any assistance would be greatly appreciated!

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

No branches or pull requests

1 participant