WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 219575
[JSC] Accept escaped keywords for class and object property names
https://bugs.webkit.org/show_bug.cgi?id=219575
Summary
[JSC] Accept escaped keywords for class and object property names
Yusuke Suzuki
Reported
2020-12-05 22:14:09 PST
[JSC] Accept escaped keywords for class and object property names
Attachments
Patch
(76.73 KB, patch)
2020-12-05 22:16 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(76.60 KB, patch)
2020-12-05 22:17 PST
,
Yusuke Suzuki
ashvayka
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2020-12-05 22:16:34 PST
Created
attachment 415510
[details]
Patch
Yusuke Suzuki
Comment 2
2020-12-05 22:17:44 PST
Created
attachment 415511
[details]
Patch
Alexey Shvayka
Comment 3
2020-12-05 22:33:03 PST
Comment on
attachment 415511
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=415511&action=review
Great job on this very neat change! r=me with a question.
> Source/JavaScriptCore/parser/ParserTokens.h:197 > + INVALID_TEMPLATE_LITERAL_ERRORTOK = 15 | CanBeErrorTokenFlag,
While introducing CanBeErrorTokenFlag for ESCAPED_KEYWORD makes perfect sense, perhaps we should leave more strict ErrorTokenFlag for other types that are definitely syntax errors?
Yusuke Suzuki
Comment 4
2020-12-05 23:11:12 PST
Comment on
attachment 415511
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=415511&action=review
Thanks!!
>> Source/JavaScriptCore/parser/ParserTokens.h:197 >> + INVALID_TEMPLATE_LITERAL_ERRORTOK = 15 | CanBeErrorTokenFlag, > > While introducing CanBeErrorTokenFlag for ESCAPED_KEYWORD makes perfect sense, perhaps we should leave more strict ErrorTokenFlag for other types that are definitely syntax errors?
I think that every token can cause an error. For example, if keyword appears in `var keyword` place, it is an error. So, the thing we would like to know is that, whether the produced token can have a special message for parser errors, and this is CanBeErrorTokenFlag which indicates that this token can be an special error token. I think current form is OK because of two reasons. One is that, this makes CanBeErrorTokenFlag meaning more general, and another reason is that adding another flag (e.g. DefinitelyErrorTokenFlag) consumes token bit, which we would like to keep :)
Yusuke Suzuki
Comment 5
2020-12-05 23:55:02 PST
Will update stress/reserved-word-with-escape.js
Yusuke Suzuki
Comment 6
2020-12-06 00:41:37 PST
Committed
r270481
: <
https://trac.webkit.org/changeset/270481
>
Radar WebKit Bug Importer
Comment 7
2020-12-06 00:42:15 PST
<
rdar://problem/72017752
>
Alexey Shvayka
Comment 8
2020-12-06 07:38:22 PST
***
Bug 200638
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug