Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Rebase on recent ECMA-262
Browse files Browse the repository at this point in the history
Changes:
- Async/await landed, so there are some grammar changes in passing
  around the [Await] parameter, and async arrow function cover grammars.
- Various refactorings in how some 'static semantics' algorithms work;
  some now cover CallExpression as a whole, and others have a different
  sort of signature.
  • Loading branch information
littledan authored and domenic committed Mar 18, 2019
1 parent a21e01e commit 016e7f4
Showing 1 changed file with 17 additions and 80 deletions.
97 changes: 17 additions & 80 deletions spec.html
Expand Up @@ -123,88 +123,25 @@ <h1><ins>Runtime Semantics: FinishDynamicImport ( _referencingScriptOrModule_, _
<h1>Left-Hand-Side Expressions</h1>
<h2>Syntax</h2>
<emu-grammar>
CallExpression[Yield] :
MemberExpression[?Yield] Arguments[?Yield]
SuperCall[?Yield]
<ins>ImportCall[?Yield]</ins>
CallExpression[?Yield] Arguments[?Yield]
CallExpression[?Yield] `[` Expression[+In, ?Yield] `]`
CallExpression[?Yield] `.` IdentifierName
CallExpression[?Yield] TemplateLiteral[?Yield]

<ins>ImportCall[Yield] :
`import` `(` AssignmentExpression[+In, ?Yield] `)`</ins>
CallExpression[Yield, Await] :
MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await]
SuperCall[?Yield, ?Await]
<ins>ImportCall[?Yield, ?Await]</ins>
CallExpression[?Yield, ?Await] Arguments[?Yield, ?Await]
CallExpression[?Yield, ?Await] `[` Expression[+In, ?Yield, ?Await] `]`
CallExpression[?Yield, ?Await] `.` IdentifierName
CallExpression[?Yield, ?Await] TemplateLiteral[?Yield, ?Await]

<ins>ImportCall[Yield, Await] :
`import` `(` AssignmentExpression[+In, ?Yield, ?Await] `)`</ins>
</emu-grammar>

<emu-clause id="sec-static-semantics">
<h1>Static Semantics</h1>

<emu-clause id="sec-static-semantics-static-semantics-isfunctiondefinition">
<h1>Static Semantics: IsFunctionDefinition</h1>
<emu-see-also-para op="IsFunctionDefinition"></emu-see-also-para>
<emu-grammar>
MemberExpression :
MemberExpression `[` Expression `]`
MemberExpression `.` IdentifierName
MemberExpression TemplateLiteral
SuperProperty
MetaProperty
`new` MemberExpression Arguments

NewExpression :
`new` NewExpression

CallExpression :
MemberExpression Arguments
SuperCall
<ins>ImportCall</ins>
CallExpression Arguments
CallExpression `[` Expression `]`
CallExpression `.` IdentifierName
CallExpression TemplateLiteral
</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
</emu-clause>

<emu-clause id="sec-static-semantics-static-semantics-isdestructuring">
<h1>Static Semantics: IsDestructuring</h1>
<emu-see-also-para op="IsDestructuring"></emu-see-also-para>
<emu-grammar>MemberExpression : PrimaryExpression</emu-grammar>
<emu-alg>
1. If |PrimaryExpression| is either an |ObjectLiteral| or an |ArrayLiteral|, return *true*.
1. Return *false*.
</emu-alg>
<emu-grammar>
MemberExpression :
MemberExpression `[` Expression `]`
MemberExpression `.` IdentifierName
MemberExpression TemplateLiteral
SuperProperty
MetaProperty
`new` MemberExpression Arguments

NewExpression :
`new` NewExpression

CallExpression :
MemberExpression Arguments
SuperCall
<ins>ImportCall</ins>
CallExpression Arguments
CallExpression `[` Expression `]`
CallExpression `.` IdentifierName
CallExpression TemplateLiteral
</emu-grammar>
<emu-alg>
1. Return *false*.
</emu-alg>
</emu-clause>

<emu-clause id="sec-static-semantics-static-semantics-isvalidsimpleassignmenttarget">
<h1>Static Semantics: IsValidSimpleAssignmentTarget</h1>
<emu-see-also-para op="IsValidSimpleAssignmentTarget"></emu-see-also-para>
<emu-clause oldids="sec-static-semantics-static-semantics-isvalidsimpleassignmenttarget" id="sec-static-semantics-static-semantics-assignmenttargettype">
<h1>Static Semantics: AssignmentTargetType</h1>
<emu-see-also-para op="AssignmentTargetType"></emu-see-also-para>
<emu-grammar>
CallExpression :
CallExpression `[` Expression `]`
Expand All @@ -216,11 +153,11 @@ <h1>Static Semantics: IsValidSimpleAssignmentTarget</h1>
SuperProperty
</emu-grammar>
<emu-alg>
1. Return *true*.
1. Return ~simple~.
</emu-alg>
<emu-grammar>
CallExpression :
MemberExpression Arguments
CoverCallExpressionAndAsyncArrowHead
SuperCall
<ins>ImportCall</ins>
CallExpression Arguments
Expand All @@ -237,7 +174,7 @@ <h1>Static Semantics: IsValidSimpleAssignmentTarget</h1>
`new` `.` `target`
</emu-grammar>
<emu-alg>
1. Return *false*.
1. Return ~invalid~.
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down

0 comments on commit 016e7f4

Please sign in to comment.