Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: src/parser.cc

Issue 18654: Fix bug in RegExp parser. (Closed)
Patch Set: Added more tests. Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regexp.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4034 matching lines...) Expand 10 before | Expand all | Expand 10 after
4045 case 'r': 4045 case 'r':
4046 Advance(); 4046 Advance();
4047 return '\r'; 4047 return '\r';
4048 case 't': 4048 case 't':
4049 Advance(); 4049 Advance();
4050 return '\t'; 4050 return '\t';
4051 case 'v': 4051 case 'v':
4052 Advance(); 4052 Advance();
4053 return '\v'; 4053 return '\v';
4054 case 'c': 4054 case 'c':
4055 Advance();
4055 return ParseControlLetterEscape(); 4056 return ParseControlLetterEscape();
4056 case '0': case '1': case '2': case '3': case '4': case '5': 4057 case '0': case '1': case '2': case '3': case '4': case '5':
4057 case '6': case '7': 4058 case '6': case '7':
4058 // For compatibility, we interpret a decimal escape that isn't 4059 // For compatibility, we interpret a decimal escape that isn't
4059 // a back reference (and therefore either \0 or not valid according 4060 // a back reference (and therefore either \0 or not valid according
4060 // to the specification) as a 1..3 digit octal character code. 4061 // to the specification) as a 1..3 digit octal character code.
4061 return ParseOctalLiteral(); 4062 return ParseOctalLiteral();
4062 case 'x': { 4063 case 'x': {
4063 Advance(); 4064 Advance();
4064 uc32 value; 4065 uc32 value;
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
4349 start_position, 4350 start_position,
4350 is_expression); 4351 is_expression);
4351 return result; 4352 return result;
4352 } 4353 }
4353 4354
4354 4355
4355 #undef NEW 4356 #undef NEW
4356 4357
4357 4358
4358 } } // namespace v8::internal 4359 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698