Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

New: Attaches comments to the ESTree AST (fixes #31) #49

Merged
merged 1 commit into from
Jul 28, 2016
Merged

New: Attaches comments to the ESTree AST (fixes #31) #49

merged 1 commit into from
Jul 28, 2016

Conversation

JamesHenry
Copy link
Member

See #34 for all the discussion leading up to this implementation

@eslintbot
Copy link

LGTM

@@ -268,6 +267,8 @@ function getTokenType(token) {

case SyntaxKind.GetKeyword:
case SyntaxKind.SetKeyword:
case SyntaxKind.TypeKeyword:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are a bunch of unrelated changes in this file?

Copy link
Member Author

@JamesHenry JamesHenry Jul 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In some cases they are required, in some cases they surfaced as bugs/missing checks when implementing the original work on this branch. Please see my comment below.

@nzakas
Copy link
Member

nzakas commented Jul 28, 2016

As noted inline, it looks like there are a lot of unrelated changes in this PR. Can you narrow it down so the changes are only related to finding the comments?

@JamesHenry
Copy link
Member Author

It is not as simple as saying they are unrelated to finding the comments... For example:

case SyntaxKind.TrueKeyword:
                assign(result, {
                    type: "Literal",
                    value: true,
                    raw: "true" // <- This was added in the PR
                });
                break;

The addition of the raw values for TrueKeyword, FalseKeyword and NullKeyword is necessary to make the attach-comments tests pass.

@nzakas
Copy link
Member

nzakas commented Jul 28, 2016

Oh I see, thanks for explaining. In that case, I think this is good to go.

@nzakas nzakas merged commit 32a46b3 into eslint:master Jul 28, 2016
@JamesHenry
Copy link
Member Author

Great, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants