Closed
Bug 1453006
Opened 7 years ago
Closed 7 years ago
Convert FunctionSyntaxKind to an enum class
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla61
| Tracking | Status | |
|---|---|---|
| firefox61 | --- | fixed |
People
(Reporter: evilpies, Assigned: evilpies)
References
Details
Attachments
(1 file)
|
17.07 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8966625 -
Flags: review?(jdemooij)
| Assignee | ||
Updated•7 years ago
|
Assignee: nobody → evilpies
Comment 1•7 years ago
|
||
Comment on attachment 8966625 [details] [diff] [review]
Convert FunctionSyntaxKind to an enum class
Review of attachment 8966625 [details] [diff] [review]:
-----------------------------------------------------------------
Nice.
::: js/src/frontend/Parser.cpp
@@ +3000,5 @@
> if (!tokenStream.getToken(&tt, firstTokenModifier))
> return false;
> if (tt != TokenKind::Lp) {
> + error(kind == FunctionSyntaxKind::Arrow
> + ? JSMSG_BAD_ARROW_ARGS : JSMSG_PAREN_BEFORE_FORMAL);
Nit: \n before ":" ?
@@ +3730,5 @@
> // function bodies are parsed with different yield/await settings.
> {
> + AwaitHandling awaitHandling =
> + funbox->isAsync() || (kind == FunctionSyntaxKind::Arrow && awaitIsKeyword())
> + ? AwaitIsKeyword : AwaitIsName;
Same here. Also maybe add parentheses around the condition while you're here - it's not obvious to me how `a || b ? x : y` is parsed.
Attachment #8966625 -
Flags: review?(jdemooij) → review+
Comment 2•7 years ago
|
||
(Btw Splinter flags this as a "WINDOWS PATCH" but we can probably ignore that...)
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1b3203bbe43b
Convert FunctionSyntaxKind to an enum class. r=jandem
Updated•7 years ago
|
Priority: -- → P3
Comment 4•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•