Changeset 160161 in webkit
- Timestamp:
- Dec 4, 2013, 11:41:26 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/webkit2/messages_unittest.py (modified) (1 diff)
-
Scripts/webkit2/parser.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r160148 r160161 1 2013-12-04 Gergo Balogh <geryxyz@inf.u-szeged.hu> 2 3 Report error when #else is used in message receiver generator's input. 4 https://bugs.webkit.org/show_bug.cgi?id=124147 5 6 Reviewed by Csaba Osztrogonác. 7 8 * Scripts/webkit2/messages_unittest.py: 9 (UnsupportedPrecompilerDirectiveTest): 10 (UnsupportedPrecompilerDirectiveTest.test_error_at_else): 11 (UnsupportedPrecompilerDirectiveTest.test_error_at_elif): 12 * Scripts/webkit2/parser.py: 13 (parse): 14 1 15 2013-12-04 Sam Weinig <sam@webkit.org> 2 16 -
trunk/Source/WebKit2/Scripts/webkit2/messages_unittest.py
r160022 r160161 1127 1127 1128 1128 1129 class UnsupportedPrecompilerDirectiveTest(unittest.TestCase): 1130 def test_error_at_else(self): 1131 with self.assertRaisesRegexp(Exception, r"ERROR: '#else.*' is not supported in the \*\.in files"): 1132 messages.generate_message_handler(StringIO("asd\n#else bla\nfoo")) 1133 1134 def test_error_at_elif(self): 1135 with self.assertRaisesRegexp(Exception, r"ERROR: '#elif.*' is not supported in the \*\.in files"): 1136 messages.generate_message_handler(StringIO("asd\n#elif bla\nfoo")) 1137 1138 1129 1139 if __name__ == '__main__': 1130 1140 unittest.main() -
trunk/Source/WebKit2/Scripts/webkit2/parser.py
r159312 r160161 60 60 continue 61 61 if line.startswith('#'): 62 trimmed = line.rstrip() 62 63 if line.startswith('#if '): 63 conditions.append( line.rstrip()[4:])64 conditions.append(trimmed[4:]) 64 65 elif line.startswith('#endif') and conditions: 65 66 conditions.pop() 67 elif line.startswith('#else') or line.startswith('#elif'): 68 raise Exception("ERROR: '%s' is not supported in the *.in files" % trimmed) 66 69 continue 67 70 match = re.search(r'([A-Za-z_0-9]+)\((.*?)\)(?:(?:\s+->\s+)\((.*?)\))?(?:\s+(.*))?', line)
Note:
See TracChangeset
for help on using the changeset viewer.