-
Notifications
You must be signed in to change notification settings - Fork 597
[JavaScript] Renames Quasi literal to Template literal #165
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
[JavaScript] Renames Quasi literal to Template literal #165
Conversation
|
Forgot to add [JavaScript] at the beginning of commit, I can fix commit message if needed. |
|
Just so I don't get this wrong, could you provide an example of the syntax this highlights? I presume it is ES6. I'd like to add it to the tests so that we are building up a "contract" over time. |
|
... Sorry I meant to look at the tests and add if something was missing/broke from the change. I'll have to look later, but no prob, will do! |
|
A reference link for Templates https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings |
6b377ae to
0c50c53
Compare
|
@wbond updated PR to include additional test case. |
|
Looking at this it may be better to change |
|
Now that I think about it, it would probably be good to make the template literal multiline in the test. I'm about to be AFK for a bit but will try to add that into the test case soon. |
|
Ah, I made sure to check the open issues for this before opening my own, but I didn't catch this one. FWIW, I reported this issue with some more detail and scope name suggestions in #169:
@subhaze, please consider these. If "template" is the official terminology, I can take that as well. I definitely recommend using |
0c50c53 to
b624e1e
Compare
|
@FichteFoll I agree on the 'element' bits completely. Since we're embedding expressions I've adjusted to scope names for this are to reflect that. Thought I'm not sure about I'm pretty new to scope naming standards so more feedback is very welcomed. Also, I was going to update the tests to check for multiline (it currently works) but it seems that the syntax tests wont allow for this as far as I can tell. In these template literals you can't break up multilines with comments... so... not sure how to test for multilines other than just adding two separate tests. |
b624e1e to
af5a8a1
Compare
|
@wbond in hindsight I felt I shouldn't have moved this down to literal-string, just so it's easier to see what was actually changed and to help reduce any kind of merge conflicts that may happen later if this PR is brought it. This PR should now provide a better story in the visual diff of what has actually changed. |
|
I would:
Maybe compare against other languages that have template/interpolated strings. |
|
Thanks, I'll review the above (hopefully later today) and adjust the PR. |
- Renamed literal-quasi definition to literal-string-template - Renamed all occurences of quasi in scopes to template - Added test cases - Updated scope names
af5a8a1 to
abdb3db
Compare
|
Updated scopes from notes above, rebased this branch on top of the current Packages master branch. |
|
Thank you both for the time spent working out improvements for this! |
[JavaScript] Renames Quasi literal to Template literal
Renames Quasi literal to Template literal