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

Unified Diff: src/parsing/scanner.cc

Issue 2780173002: [regexp] Add support for dotAll flag (Closed)
Patch Set: Address comments Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | src/regexp/regexp-parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/scanner.cc
diff --git a/src/parsing/scanner.cc b/src/parsing/scanner.cc
index 842f2b560bdf085d4928409ba427adaab2ea9a8a..81839990c6cc8de2ff5f327b5300477ebb280d66 100644
--- a/src/parsing/scanner.cc
+++ b/src/parsing/scanner.cc
@@ -1717,6 +1717,13 @@ Maybe<RegExp::Flags> Scanner::ScanRegExpFlags() {
case 'm':
flag = RegExp::kMultiline;
break;
+ case 's':
+ if (FLAG_harmony_regexp_dotall) {
+ flag = RegExp::kDotAll;
+ } else {
+ return Nothing<RegExp::Flags>();
+ }
+ break;
case 'u':
flag = RegExp::kUnicode;
break;
« no previous file with comments | « src/objects.cc ('k') | src/regexp/regexp-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698