RESOLVED FIXED 65046
Add parsing support for extended attributes on IDL constants
https://bugs.webkit.org/show_bug.cgi?id=65046
Summary Add parsing support for extended attributes on IDL constants
Patrick R. Gansterer
Reported 2011-07-22 14:20:14 PDT
Add parsing support for extended attributes on IDL constants
Attachments
Patch (3.72 KB, patch)
2011-07-22 14:29 PDT, Patrick R. Gansterer
no flags
Patrick R. Gansterer
Comment 1 2011-07-22 14:29:11 PDT
Brent Fulgham
Comment 2 2011-08-29 12:00:42 PDT
Comment on attachment 101766 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101766&action=review Looks good. r+, but please consider my suggestions. > Source/WebCore/bindings/scripts/IDLParser.pm:332 > + my $constExtendedAttributes = (defined($1) ? $1 : " "); chop($constExtendedAttributes); I'm not a fan of having two bits of logic on a single line like this. I'd rather see the 'chop' on its own line. > Source/WebCore/bindings/scripts/IDLStructure.pm:97 > +our $constantSelector = 'const\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)\s*=\s*(' . $constValue . ')'; Does adding this new elements to the IDL structure require lots of the existing IDL to be changed? I think the answer is no (based on the EWS), but I just wanted to double-check.
Patrick R. Gansterer
Comment 3 2011-08-29 12:42:07 PDT
Comment on attachment 101766 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101766&action=review >> Source/WebCore/bindings/scripts/IDLParser.pm:332 >> + my $constExtendedAttributes = (defined($1) ? $1 : " "); chop($constExtendedAttributes); > > I'm not a fan of having two bits of logic on a single line like this. I'd rather see the 'chop' on its own line. It's only the same code as in ... http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/IDLParser.pm?rev=91770#L216 http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/IDLParser.pm?rev=91770#L245 http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/IDLParser.pm?rev=91770#L279 http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/IDLParser.pm?rev=91770#L312 >> Source/WebCore/bindings/scripts/IDLStructure.pm:97 >> +our $constantSelector = 'const\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)\s*=\s*(' . $constValue . ')'; > > Does adding this new elements to the IDL structure require lots of the existing IDL to be changed? I think the answer is no (based on the EWS), but I just wanted to double-check. as the ? in the regexp already says: it's optional :-)
Brent Fulgham
Comment 4 2011-08-29 12:47:58 PDT
Comment on attachment 101766 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101766&action=review Re-approved. r+ >>> Source/WebCore/bindings/scripts/IDLParser.pm:332 >>> + my $constExtendedAttributes = (defined($1) ? $1 : " "); chop($constExtendedAttributes); >> >> I'm not a fan of having two bits of logic on a single line like this. I'd rather see the 'chop' on its own line. > > It's only the same code as in ... > http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/IDLParser.pm?rev=91770#L216 > http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/IDLParser.pm?rev=91770#L245 > http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/IDLParser.pm?rev=91770#L279 > http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/IDLParser.pm?rev=91770#L312 Okay -- existing precedent trumps personal opinion :-) >>> Source/WebCore/bindings/scripts/IDLStructure.pm:97 >>> +our $constantSelector = 'const\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)\s*=\s*(' . $constValue . ')'; >> >> Does adding this new elements to the IDL structure require lots of the existing IDL to be changed? I think the answer is no (based on the EWS), but I just wanted to double-check. > > as the ? in the regexp already says: it's optional :-) Great!
WebKit Review Bot
Comment 5 2011-08-29 13:36:35 PDT
Comment on attachment 101766 [details] Patch Clearing flags on attachment: 101766 Committed r94010: <http://trac.webkit.org/changeset/94010>
WebKit Review Bot
Comment 6 2011-08-29 13:36:39 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.