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

Closes estree/estree#6 #99

Closed
wants to merge 2 commits into from
Closed

Conversation

jasonLaster
Copy link

This picks up @dherman's earlier commit where it left off.

Also attempted to addres @michaelficarra's concern about raw string source's being wrapped with quotes.

This picks up @dherman [earlier
commit](dherman@70ba4ab)
where it left off.

Also attempted to addres @michaelficarra's concern about raw string
source's being wrapped with quotes.
}
```

The body of a function, which is a block statement that may contain a directive prologue.

Choose a reason for hiding this comment

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

A Directive Prologue is always present (but sometimes empty). Perhaps "… a block statement that may begin with directives"?

Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, we could put separate array directives in front of body.

Copy link
Member

Choose a reason for hiding this comment

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

(Same for Program node)

Choose a reason for hiding this comment

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

Alternatively, we could put separate array directives in front of body.

That would either remove directives from body (which breaks backwards compatibility) or reference them twice (which is not JSON-friendly).

Copy link
Member

Choose a reason for hiding this comment

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

Please see my comment about interface Directive below - it already breaks backward compatibility!

Choose a reason for hiding this comment

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

How does inheriting from ExpressionStatement to add a property without changing anything else (including type) break backwards compatibility?

+ [ Directive, ..., Statement ] => [ Directive | Statement ]
+ Update FunctionBody description
+ Remove EscapeSequence and LineContinuation language

A directive from the directive prologue of a script or function.
The `directive` property is the raw string source of the directive.
This value includes single or double wrapping quotes.

Choose a reason for hiding this comment

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

I don't think quotes should be included in the value. "use strict" and 'use strict' should yield identical ASTs.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. They're insignificant.

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

Successfully merging this pull request may close these issues.

6 participants