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

Unified Diff: pkg/intl/lib/src/intl_message.dart

Issue 129813005: Add an examples getter for all Message objects in Intl (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/src/intl_message.dart
diff --git a/pkg/intl/lib/src/intl_message.dart b/pkg/intl/lib/src/intl_message.dart
index 13aad6248562b233564c31adb0dabd00b05b121f..24290d2c9088a3e1fc85ba8f08baf0ecea7708d8 100644
--- a/pkg/intl/lib/src/intl_message.dart
+++ b/pkg/intl/lib/src/intl_message.dart
@@ -61,6 +61,12 @@ abstract class Message {
*/
get arguments => parent == null ? const [] : parent.arguments;
+ /**
+ * We find the examples from the top-level [MainMessage] and use those
Emily Fortuna 2014/01/09 23:10:32 does this comment make sense, because according to
Alan Knight 2014/01/10 18:44:28 But MainMessage has an examples field that overrid
+ * when writing out variables.
+ */
+ get examples => parent == null ? const [] : parent.examples;
+
String checkValidity(MethodInvocation node, List arguments,
String outerName, FormalParameterList outerArgs) {
var hasArgs = arguments.any(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698