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

Unified Diff: pkg/dartdoc/inline_parser.dart

Issue 10910253: Change RegExp constructor to insist on proper named optional parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update co19/dart2js status. Created 8 years, 3 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 | « lib/core/regexp.dart ('k') | runtime/lib/regexp_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/inline_parser.dart
diff --git a/pkg/dartdoc/inline_parser.dart b/pkg/dartdoc/inline_parser.dart
index 6f45e9ff66899a3fb17c12732ccc13a87589af1d..52c3e741f6c0c1881035936c4bb96523341fa723 100644
--- a/pkg/dartdoc/inline_parser.dart
+++ b/pkg/dartdoc/inline_parser.dart
@@ -140,8 +140,7 @@ class InlineSyntax {
final RegExp pattern;
InlineSyntax(String pattern)
- : pattern = new RegExp(pattern, true);
- // TODO(rnystrom): Should use named arg for RegExp multiLine.
+ : pattern = new RegExp(pattern, multiLine: true);
bool tryMatch(InlineParser parser) {
final startMatch = pattern.firstMatch(parser.currentSource);
@@ -205,10 +204,9 @@ class TagSyntax extends InlineSyntax {
TagSyntax(String pattern, [String tag, String end = null])
: super(pattern),
- endPattern = new RegExp((end != null) ? end : pattern, true),
+ endPattern = new RegExp((end != null) ? end : pattern, multiLine: true),
tag = tag;
// TODO(rnystrom): Doing this.field doesn't seem to work with named args.
- // TODO(rnystrom): Should use named arg for RegExp multiLine.
bool onMatch(InlineParser parser, Match match) {
parser._stack.add(new TagState(parser.pos,
« no previous file with comments | « lib/core/regexp.dart ('k') | runtime/lib/regexp_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698