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

Better syntax for wrapping JavaScript code #60

Closed
chaosprint opened this issue Feb 21, 2022 · 0 comments
Closed

Better syntax for wrapping JavaScript code #60

chaosprint opened this issue Feb 21, 2022 · 0 comments
Labels
RFC Request for Comments

Comments

@chaosprint
Copy link
Owner

chaosprint commented Feb 21, 2022

Currently, glicol-js uses regex to find everything between {{}} as js code:

o: sin {{42*10+20}}

But apperently due to the limitation of JS's regex limitation, you cannot write any {} in your js code.
This can be changed by using some other symbols.
Some options:

o: sin "42*10+20"
o: sin %42*10+20%
o: sin |42*10+20|

Any suggestions?

Edit:

I am now settled with:

o: sin ##42*10+20#

Need this asymmetric style for regex.

@chaosprint chaosprint added the RFC Request for Comments label Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request for Comments
Projects
None yet
Development

No branches or pull requests

1 participant