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

Unified Diff: pkg/analyzer/lib/src/generated/testing/html_factory.dart

Issue 712083003: Create fewer unnecessary lists (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
Index: pkg/analyzer/lib/src/generated/testing/html_factory.dart
diff --git a/pkg/analyzer/lib/src/generated/testing/html_factory.dart b/pkg/analyzer/lib/src/generated/testing/html_factory.dart
index 514ceaa82102b9794894f50a9046c5dac41df258..4be90d19ff435d6f6a74f3b10e11645eaadfe61c 100644
--- a/pkg/analyzer/lib/src/generated/testing/html_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/html_factory.dart
@@ -32,7 +32,7 @@ class HtmlFactory {
return new Token.con1(TokenType.LT_SLASH, 0);
}
- static HtmlScriptTagNode scriptTag(List<XmlAttributeNode> attributes) {
+ static HtmlScriptTagNode scriptTag([List<XmlAttributeNode> attributes = XmlAttributeNode.EMPTY_LIST]) {
return new HtmlScriptTagNode(
ltToken(),
stringToken("script"),
@@ -45,7 +45,7 @@ class HtmlFactory {
}
static HtmlScriptTagNode scriptTagWithContent(String contents,
- List<XmlAttributeNode> attributes) {
+ [List<XmlAttributeNode> attributes = XmlAttributeNode.EMPTY_LIST]) {
Token attributeEnd = gtToken();
Token contentToken = stringToken(contents);
attributeEnd.setNext(contentToken);
@@ -70,7 +70,7 @@ class HtmlFactory {
return new Token.con2(TokenType.STRING, 0, value);
}
- static XmlTagNode tagNode(String name, List<XmlAttributeNode> attributes) {
+ static XmlTagNode tagNode(String name, [List<XmlAttributeNode> attributes = XmlAttributeNode.EMPTY_LIST]) {
return new XmlTagNode(
ltToken(),
stringToken(name),
« no previous file with comments | « pkg/analyzer/lib/src/generated/testing/element_factory.dart ('k') | pkg/analyzer/test/generated/all_the_rest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698