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

Give nullish coalescing lower precedence than logical OR. #40

Closed
Next Next commit
Give nullish coalescing lower precedence than logical OR.
DanielRosenwasser committed Jul 12, 2019
commit 55ad6814e69648513378b92d8730879ba25a4271
17 changes: 16 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
@@ -22,10 +22,25 @@ <h1>Introduction</h1>
<h1>Syntax</h1>

<emu-grammar>
ConditionalExpression[In, Yield, Await] :
<del>LogicalORExpression[?In, ?Yield, ?Await]</del>
<del>LogicalORExpression[?In, ?Yield, ?Await] `?` AssignmentExpression[+In, ?Yield, ?Await] `:` AssignmentExpression[?In, ?Yield, ?Await]</del>
jridgewell marked this conversation as resolved.
Show resolved Hide resolved
<ins>NullishExpression[?In, ?Yield, ?Await]</ins>
<ins>NullishExpression[?In, ?Yield, ?Await] `?` AssignmentExpression[+In, ?Yield, ?Await] `:` AssignmentExpression[+In, ?Yield, ?Await]</ins>

<ins>
NullishExpression[In, Yield, Await] :
LogicalORExpression[?In, ?Yield, ?Await]
LogicalORExpression[?In, ?Yield, ?Await] `??` NullishExpression[?In, ?Yield, ?Await]
</ins>

LogicalORExpression[In, Yield, Await] :
LogicalANDExpression[?In, ?Yield, ?Await]
LogicalORExpression[?In, ?Yield, ?Await] `||` LogicalANDExpression[?In, ?Yield, ?Await]
<ins>LogicalORExpression[?In, ?Yield, ?Await] `??` LogicalANDExpression[?In, ?Yield, ?Await]</ins>

LogicalANDExpression[In, Yield, Await] :
BitwiseORExpression[?In, ?Yield, ?Await]
LogicalANDExpression[?In, ?Yield, ?Await] `&&` BitwiseORExpression[?In, ?Yield, ?Await]
</emu-grammar>
</emu-clause>
Copy link
Member

Choose a reason for hiding this comment

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

Seems like these two tentative <emu-clause>s can be deleted if they're now incorporated into the context below.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be fixed now both here and in #39.