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

Unified Diff: pkg/dart_messages/bin/publish.dart

Issue 1706033002: More shared messages. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/dart_messages/lib/generated/shared_messages.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dart_messages/bin/publish.dart
diff --git a/pkg/dart_messages/bin/publish.dart b/pkg/dart_messages/bin/publish.dart
index acba54f4371238ab979f35e7d29eb5eeb1fe2922..d6e3f87aafd9f214202a6be3d8b66c0b89a9c701 100644
--- a/pkg/dart_messages/bin/publish.dart
+++ b/pkg/dart_messages/bin/publish.dart
@@ -155,9 +155,12 @@ String convertToAnalyzerTemplate(String template, holeOrder) {
}
}
int seenHoles = 0;
- return template.replaceAllMapped(new RegExp(r"#\w+"), (Match match) {
+ return template.replaceAllMapped(new RegExp(r"#\w+|#{\w+}"), (Match match) {
if (holeMap != null) {
- String holeName = match[0].substring(1);
+ String matchedString = match[0];
+ String holeName = matchedString.startsWith("#{")
+ ? matchedString.substring(2, matchedString.length - 1)
+ : matchedString.substring(1);
int index = holeMap[holeName];
if (index == null) {
throw "Couldn't find hole-position for $holeName $holeMap";
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/dart_messages/lib/generated/shared_messages.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698