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

js error: Octal escape sequences are not allowed in template strings #45

Open
serkonda7 opened this issue May 16, 2023 · 0 comments
Open
Labels
Milestone

Comments

@serkonda7
Copy link
Member

serkonda7 commented May 16, 2023

Description and Reproduction Sample

x := 'abc'
println('\033[0;31m${x}\033[0m')

Current Behavior

println(from_js_string(`\033[0;31m${x.str}\033[0m`).str)
                                 ^^
SyntaxError: Octal escape sequences are not allowed in template strings.

Expected Behavior

Compiles and runs fine

Possible Solution and Additional Information

JSGen should detect this and generate string concatenation instead.

Environment details (bait doctor)

Version: Bait 0.0.3-dev c295fdc
OS: linux/x64
Git: git version 2.40.1
Node.js: v19.9.0

@serkonda7 serkonda7 added the bug label May 16, 2023
@serkonda7 serkonda7 added this to the Backlog milestone Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant