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

An issue about Template Literal syntax #773

Closed
NWU-NISL opened this issue Sep 28, 2020 · 4 comments · Fixed by #904
Closed

An issue about Template Literal syntax #773

NWU-NISL opened this issue Sep 28, 2020 · 4 comments · Fixed by #904
Labels
good first issue Great place to start if you're looking to start an open source "resume"

Comments

@NWU-NISL
Copy link

According to ES6.0, the syntax of Template Literal Lexical Components has explained that the LineTerminatorSequence could appear in the template string. But rhino throws an exception at compilation when <LF> appears in the string below. This may be an issue of rhino.

version

1.7.12

command

java -jar  rhino/rhino-1.7.12.jar -debug -version 200 testcase.js

testcase

var str1 = `hello\nrhino`;
var str2 = `hello
rhino`;
print(str1);
print(str2);

output

line 2: unterminated string literal
var str2 = `hello
................^
line 3: unterminated string literal
rhino`;
......^
line 1: Compilation produced 2 syntax errors.

expected output

hello
rhino
hello
rhino

contributor:@YuanWangC

@tonygermano
Copy link
Contributor

Template Literals are not currently implemented, so you may want to hold off running your tests on them for now.

@NWU-NISL
Copy link
Author

Thanks for replying!
Executing the test case below could get the expected output. The Template Literals is not completely implemented, is it?

testcase
var str1 = `hello\nrhino`;
print(str1);
expected output
hello
rhino

@gbrail gbrail added the good first issue Great place to start if you're looking to start an open source "resume" label Nov 18, 2020
@thewittystranger
Copy link

I want to contribute , this is my first issue in Open Source!
I have experience in competitive programming..
I am not getting any idea on how to proceed to my first issue, please do guide!!!

@p-bakker
Copy link
Collaborator

#243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Great place to start if you're looking to start an open source "resume"
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants