-
Notifications
You must be signed in to change notification settings - Fork 14
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
Harmonize strings delimiters inside the code, to free " or ' as compression token #55
Comments
Complement : support for backquotes (ES6 template string) if ES6 flag (#54) is on. |
Extended the issue scope, hence the new title. Following initial work on this issue, the preprocessor now recognizes strings in the input code. This might be reused for other tasks (#13, #57). Suggested algorithm :
|
Current implementation only addresses the first three bullet points above.
|
Compute optimal packed string delimiter (', ", ` if ES6)
Currently, characters 34
"
and 39'
are banned as tokens for crusher / packer stages.The rationale behind that is that if one is present in the input, the other one will be needed as the delimiter for the packed string.
However, if neither of them is present in the string, one will still be used as delimiter, while the other one could become a token. This adds a bit of complexity upon building the token list as the algorithm will have to determine which one will produce the longest ranges in the character class.
Having one or the other will not impact the crusher though.
The text was updated successfully, but these errors were encountered: