[WebIDL] Add support for identifiers with hyphens ('-')
Created attachment 411258 [details] Patch
Comment on attachment 411258 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411258&action=review > Source/WebCore/ChangeLog:12 > + Update identifer regular expression to match current spec which allows for dashes ('-'). identifer > Source/WebCore/ChangeLog:19 > + underscores ('__'), as that is not likely to ever appear in an identifier. C++ reserves identifiers containing double underscores. https://en.cppreference.com/w/cpp/language/identifiers Maybe "_dash_"?
(In reply to Darin Adler from comment #2) > Comment on attachment 411258 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=411258&action=review > > > Source/WebCore/ChangeLog:12 > > + Update identifer regular expression to match current spec which allows for dashes ('-'). > > identifer > > > Source/WebCore/ChangeLog:19 > > + underscores ('__'), as that is not likely to ever appear in an identifier. > > C++ reserves identifiers containing double underscores. > https://en.cppreference.com/w/cpp/language/identifiers Oh, interesting. I for some reason always thought it was double underscores at the beginning of an identifier, but no, it's anywhere. > > Maybe "_dash_"? That seems good. Will update. Thanks.
Created attachment 411264 [details] Patch
Unicode names the ASCII character "hyphen-minus". So we are being super colloquial calling it a "dash". But that word seems friendly enough.
(In reply to Darin Adler from comment #5) > Unicode names the ASCII character "hyphen-minus". So we are being super > colloquial calling it a "dash". But that word seems friendly enough. Sorry, a bit unclear here. Are you suggesting I change it from "_dash_" to something else?
No. Just musing on whether this character is a "dash" or a "hyphen", don’t really care which name we chose.
Committed r268435: <https://trac.webkit.org/changeset/268435> All reviewed patches have been landed. Closing bug and clearing flags on attachment 411264 [details].
<rdar://problem/70272997>
(In reply to Darin Adler from comment #7) > No. Just musing on whether this character is a "dash" or a "hyphen", don’t > really care which name we chose. Heh. I clearly had the same musing as the test case still uses "hyphen" :). I went back and forth a few times.