This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 664
Rename *Literal
nodes to *LiteralExpression
#1800
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 tasks
@MichaReiser as you can see the CI is not triggering any action. I think you should add I think we should come up with a naming convention for branches that will require multiple PRs and still triggering the CI (myself and yourself are doing this). Something like |
The CI job will run when the base branch is merged. |
That's the thing. The CI is not running here and there's now way for reviewers to see if these new changes are healthy or not. What if the coverage goes down? Lint issues? |
ematipico
approved these changes
Nov 18, 2021
MichaReiser
force-pushed
the
feature/literal-expressions
branch
from
November 22, 2021 09:50
0d0cb2d
to
9c7b859
Compare
Deploying with Cloudflare Pages
|
MichaReiser
force-pushed
the
feature/member-expression
branch
from
November 22, 2021 09:54
bc542cc
to
3da3c66
Compare
MichaReiser
force-pushed
the
feature/literal-expressions
branch
from
November 22, 2021 11:57
9c7b859
to
cc95b9b
Compare
MichaReiser
force-pushed
the
feature/member-expression
branch
from
November 22, 2021 12:02
3da3c66
to
3aff5af
Compare
MichaReiser
force-pushed
the
feature/literal-expressions
branch
from
November 22, 2021 15:20
cc95b9b
to
71a166b
Compare
Test262 comparison coverage results on ubuntu-latest
|
Test262 comparison coverage results on windows-latest
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
#1799 introduced a new
JsLiteralMemberName
that is defined asJsLiteralMemberName = value: ('ident' | 'js_string_literal_token' | 'js_number_literal_token')
. That means, quering for allStringLiterals
usingroot.descendants().filter(JsStringLiteral::cast)
will not return thestring_literal_token
inside of theJsLiteralMemberName
.This is expected, because the
JsLiteralMemberName
contains the token and not theJsStringLiteral
node but it may be unexpected for pass authors.I believe that not using a
JsStringLiteral
inside of member names or import statements (module name) is desired because authors may otherwise be inclined to, for example, replace allJsStringLiteral
withJsTemplateLiteralExpression
but that will create an invalid syntax tree in the case of import statements.That's why this PR renames
Js*Literal
s toJs*LiteralExpression
to make it clear that these are the literal expressions. It then renamesJS_*_LITERAL_TOKEN
toJS_*_LITERAL
as we no longer need the token postfix to avoid the name collision.The PR does not change the parsing for
PropName
since this will go away soon anyway.Test Plan
Verified the changes rast outputs to make sure the parser changes were correctly applied.