Chromium Code Reviews| Index: lib/src/info.dart |
| diff --git a/lib/src/info.dart b/lib/src/info.dart |
| index c01bbcfe2de52d5e4b98f1c1807a2d5eeb78575e..60629f4a4ccadd78cf6bf032516a099e91566a46 100644 |
| --- a/lib/src/info.dart |
| +++ b/lib/src/info.dart |
| @@ -374,10 +374,10 @@ class ElementInfo extends NodeInfo<Element> { |
| final Set<String> removeAttributes = new Set<String>(); |
| /** Whether the template element has `iterate="... in ...". */ |
| - bool get hasIterate => false; |
| + bool get hasLoop => false; |
| /** Whether the template element has an `if="..."` conditional. */ |
| - bool get hasIfCondition => false; |
| + bool get hasCondition => false; |
| bool get isTemplateElement => false; |
| @@ -397,8 +397,8 @@ class ElementInfo extends NodeInfo<Element> { |
| 'childrenCreatedInCode: $childrenCreatedInCode, ' |
| 'component: $component, ' |
| 'descendantHasBinding: $descendantHasBinding, ' |
| - 'hasIterate: $hasIterate, ' |
| - 'hasIfCondition: $hasIfCondition, ' |
| + 'hasLoop: $hasLoop, ' |
| + 'hasCondition: $hasCondition, ' |
| 'attributes: $attributes, ' |
| 'events: $events>'; |
| } |
| @@ -546,10 +546,18 @@ class TemplateInfo extends ElementInfo { |
| */ |
| final String loopItems; |
| + /** |
| + * True if this is a repeat. Otherwise, it is an iterate. |
|
Siggi Cherem (dart-lang)
2013/04/05 20:09:24
maybe clarify that this is only if 'hasLoop' is tr
Jennifer Messerly
2013/04/05 20:34:36
thanks, clarified.
|
| + * |
| + * For template elements, the two are equivalent, but for template attributes |
| + * repeat is more expressive. |
| + */ |
| + final bool isRepeat; |
| + |
| TemplateInfo(Node node, ElementInfo parent, |
| - {this.ifCondition, this.loopVariable, this.loopItems}) |
| + {this.ifCondition, this.loopVariable, this.loopItems, this.isRepeat}) |
| : super(node, parent) { |
| - childrenCreatedInCode = hasIfCondition || hasIterate; |
| + childrenCreatedInCode = hasCondition || hasLoop; |
| } |
| /** |
| @@ -558,9 +566,9 @@ class TemplateInfo extends ElementInfo { |
| */ |
| bool get isTemplateElement => node.tagName == 'template'; |
| - bool get hasIfCondition => ifCondition != null; |
| + bool get hasCondition => ifCondition != null; |
| - bool get hasIterate => loopVariable != null; |
| + bool get hasLoop => loopVariable != null; |
| String toString() => '#<TemplateInfo ${super.toString()}' |
| 'ifCondition: $ifCondition, ' |