Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3154)

Issue 5244056: Add support for quasi literals. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by arv
Modified:
12 years, 7 months ago
CC:
traceur-compiler-reviews_google.com
Base URL:
https://traceur-compiler.googlecode.com/svn/trunk
Visibility:
Public.

Description

Add support for quasi literals. var x = 3; var y = 5; console.log(`$x + $y = ${x + y}`); BUG=http://code.google.com/p/traceur-compiler/issues/detail?id=47 TEST=test/feature/QuasiLiterals/* Committed: http://code.google.com/p/traceur-compiler/source/detail?r=335

Patch Set 1 #

Total comments: 1

Patch Set 2 : cleanup #

Total comments: 2

Patch Set 3 : Externalize callsite and clean up \u2028 and \u2029 #

Total comments: 11

Patch Set 4 : Handle comment between quasi tag and back quote #

Patch Set 5 : Use a loop instead of regexp replaces #

Unified diffs Side-by-side diffs Delta from patch set Stats (+789 lines, -23 lines) Patch
M src/codegeneration/ParseTreeTransformer.js View 2 chunks +35 lines, -0 lines 0 comments Download
M src/codegeneration/ParseTreeWriter.js View 1 2 chunks +38 lines, -0 lines 0 comments Download
M src/codegeneration/ProgramTransformer.js View 1 2 3 chunks +4 lines, -1 line 0 comments Download
A src/codegeneration/QuasiLiteralTransformer.js View 1 2 3 4 1 chunk +242 lines, -0 lines 0 comments Download
M src/runtime/runtime.js View 1 2 3 4 2 chunks +17 lines, -0 lines 0 comments Download
M src/syntax/ParseTreeValidator.js View 1 1 chunk +21 lines, -0 lines 0 comments Download
M src/syntax/ParseTreeVisitor.js View 1 chunk +20 lines, -0 lines 0 comments Download
M src/syntax/Parser.js View 7 chunks +93 lines, -5 lines 0 comments Download
M src/syntax/PredefinedName.js View 3 chunks +3 lines, -0 lines 0 comments Download
M src/syntax/Scanner.js View 1 2 3 6 chunks +108 lines, -3 lines 0 comments Download
M src/syntax/TokenType.js View 1 chunk +5 lines, -1 line 0 comments Download
M src/syntax/trees/ParseTree.js View 3 chunks +13 lines, -10 lines 0 comments Download
M src/syntax/trees/ParseTrees.js View 1 2 chunks +26 lines, -3 lines 0 comments Download
M src/traceur.js View 1 chunk +1 line, -0 lines 0 comments Download
A test/feature/QuasiLiterals/Default.js View 1 2 3 4 1 chunk +58 lines, -0 lines 0 comments Download
A test/feature/QuasiLiterals/Error_InvalidSubstitution.js View 1 chunk +5 lines, -0 lines 0 comments Download
A test/feature/QuasiLiterals/Error_InvalidSubstitution2.js View 1 chunk +5 lines, -0 lines 0 comments Download
A test/feature/QuasiLiterals/Error_NoWhitespaceAllowed.js View 1 chunk +5 lines, -0 lines 0 comments Download
A test/feature/QuasiLiterals/Error_NotClosed.js View 1 chunk +5 lines, -0 lines 0 comments Download
A test/feature/QuasiLiterals/Tag.js View 1 2 3 4 1 chunk +79 lines, -0 lines 0 comments Download
M test/feature/feature_test.html View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 18
arv
https://codereview.appspot.com/5244056/diff/1/src/syntax/trees/ParseTree.js File src/syntax/trees/ParseTree.js (right): https://codereview.appspot.com/5244056/diff/1/src/syntax/trees/ParseTree.js#newcode151 src/syntax/trees/ParseTree.js:151: case ParseTreeType.QUASI_LITERAL_EXPRESSION: Sorted. I only added the QUASI_LITERAL_EXPRESSION
12 years, 7 months ago (2011-10-10 07:15:47 UTC) #1
arv
Last night I realized that I forgot to externalize the callsite object. I'm fine doing ...
12 years, 7 months ago (2011-10-10 17:06:26 UTC) #2
arv
The callsite id is now externalized.
12 years, 7 months ago (2011-10-10 19:12:51 UTC) #3
Mike Samuel
I can't view Tag.js in unified diff mode since http://codereview.appspot.com/5244056/patch/6001/7020 contains lines with no diff ...
12 years, 7 months ago (2011-10-10 22:01:51 UTC) #4
arv
On 2011/10/10 22:01:51, Mike Samuel wrote: > I can't view Tag.js in unified diff mode ...
12 years, 7 months ago (2011-10-10 22:05:43 UTC) #5
Mike Samuel
On Mon, Oct 10, 2011 at 15:05, <arv@chromium.org> wrote: > On 2011/10/10 22:01:51, Mike Samuel ...
12 years, 7 months ago (2011-10-10 22:22:11 UTC) #6
arv
On Mon, Oct 10, 2011 at 15:22, ☻Mike Samuel <msamuel@google.com> wrote: > f`x${y}z` should desugar ...
12 years, 7 months ago (2011-10-10 22:31:45 UTC) #7
Mike Samuel
On Mon, Oct 10, 2011 at 15:31, Erik Arvidsson <arv@chromium.org> wrote: > On Mon, Oct ...
12 years, 7 months ago (2011-10-10 22:38:53 UTC) #8
arv
John, Chris? Do you want me to find some other reviewer? erik On Mon, Oct ...
12 years, 7 months ago (2011-10-12 21:59:02 UTC) #9
cburrows
I started to look but got side-tracked. I'll take a look tonight! chris On Wed, ...
12 years, 7 months ago (2011-10-12 22:27:29 UTC) #10
John Messerly
Thanks Chris. I'm still recovering from Dart tech preview launch :) (or more accurately ...
12 years, 7 months ago (2011-10-12 23:34:31 UTC) #11
cburrows
I am a little nervous about the scanner scanning inside the literal. It seems like ...
12 years, 7 months ago (2011-10-13 21:46:22 UTC) #12
arv
I agree that this is a bit tricky. Just like for regexps I think this ...
12 years, 7 months ago (2011-10-13 22:39:52 UTC) #13
Mike Samuel
On Thu, Oct 13, 2011 at 18:39, <arv@chromium.org> wrote: > I agree that this is ...
12 years, 7 months ago (2011-10-14 16:29:06 UTC) #14
cburrows
On 2011/10/13 22:39:52, arv1 wrote: > The quasi tag needs to be directly in front ...
12 years, 7 months ago (2011-10-14 16:56:38 UTC) #15
Mike Samuel
On Fri, Oct 14, 2011 at 12:56, <cburrows@google.com> wrote: > On 2011/10/13 22:39:52, arv1 wrote: ...
12 years, 7 months ago (2011-10-14 17:59:32 UTC) #16
arv
Chris, you were right that the regexp replace was broken. I ended up rewriting the ...
12 years, 7 months ago (2011-10-14 18:55:15 UTC) #17
cburrows
12 years, 7 months ago (2011-10-14 19:05:45 UTC) #18
On 2011/10/14 18:55:15, arv1 wrote:
> Chris, you were right that the regexp replace was broken.
> 
> I ended up rewriting the cooking regexp replaces with a single loop instead.
It
> might be less efficient but it is a lot clearer and also correct which is a
> bonus ;-)

LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b