WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
22673
Added support for the assertion (?=) and inverted assertion (?!) atoms in WREC.
https://bugs.webkit.org/show_bug.cgi?id=22673
Summary
Added support for the assertion (?=) and inverted assertion (?!) atoms in WREC.
Geoffrey Garen
Reported
2008-12-04 23:13:58 PST
Patch coming.
Attachments
patch
(8.61 KB, patch)
2008-12-04 23:14 PST
,
Geoffrey Garen
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2008-12-04 23:14:20 PST
Created
attachment 25763
[details]
patch
Darin Adler
Comment 2
2008-12-05 05:51:17 PST
Comment on
attachment 25763
[details]
patch
> + switch (type) { > + case Generator::Assertion: { > + m_generator.generateParenthesesAssertion(failures); > + break; > + } > + case Generator::InvertedAssertion: { > + m_generator.generateParenthesesInvertedAssertion(failures); > + break; > + } > + default: { > + m_error = UnsupportedParentheses; > + return false; > + } > + }
We normally indent cases from the switch. We normally use braces for cases only when they are needed.
> + switch (q.type) { > + case Quantifier::None: { > + return true; > + } > + case Quantifier::Greedy: { > + m_error = UnsupportedParentheses; > + return false; > + } > + case Quantifier::NonGreedy: { > + m_error = UnsupportedParentheses; > + return false; > + } > + case Quantifier::Error: { > + return false; > + } > + }
Ditto. r=me
Geoffrey Garen
Comment 3
2008-12-05 08:49:57 PST
Committed revision 39030.
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