You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we only have auto numbers (and bools) conversion to hanzi in online ide. Not in cli, in browser runtime and other interfaces like vscode and sublime plugins.
I propose to extract the functionality and expose it in the core package allowing other interfaces to reuse this feature. This can make it more wenyan-ish without care about the internal details about it.
Meanwhile, this can also solve the floating-point testing issue, #457.
👍 Sounds great! Please feel free to make a PR.
I'm not sure how readable the word hanzinize though, it sounds fun, but we might also consider something plain like outputHanzi. Let's think about it a bit more.
Thanks a lot and good luck with the PR, let me know if there's something I could help.
Describe your issue/suggestions
Currently, we only have auto numbers (and bools) conversion to hanzi in online ide. Not in cli, in browser runtime and other interfaces like vscode and sublime plugins.
I propose to extract the functionality and expose it in the core package allowing other interfaces to reuse this feature. This can make it more wenyan-ish without care about the internal details about it.
Meanwhile, this can also solve the floating-point testing issue, #457.
I would love to make a PR for this.
More related issues #465, antfu/wenyan-lang-vscode#12
Technical
New function
execute
Allowing users to directly execute the source code through the API. This will be a simple wrapper of
compile
andevalCompiled
New function
evalCompiled
This is basically all the changes happen. It will hijack the console.log and outputs hanzi result when the hanzinize option is set.
New CLI options
--hanzinize
Default to true. Only works for executing mode
New Browser Runtime script attr
hanzinize
Default to true.
Checklist
Before you create this issue, Please make sure ALL the following items are checked
The text was updated successfully, but these errors were encountered: