@@ -41,9 +41,9 @@ class DirectiveSelector {
41
41
}
42
42
43
43
if ((match = _CONTAINS_REGEXP .firstMatch (selector)) != null ) {
44
- textSelector.add (new _ContainsSelector (annotation , match[1 ]));
44
+ textSelector.add (new _ContainsSelector (selector , match[1 ]));
45
45
} else if ((match = _ATTR_CONTAINS_REGEXP .firstMatch (selector)) != null ) {
46
- attrSelector.add (new _ContainsSelector (annotation , match[1 ]));
46
+ attrSelector.add (new _ContainsSelector (selector , match[1 ]));
47
47
} else if ((selectorParts = _splitCss (selector, type)) != null ){
48
48
elementSelector.addDirective (selectorParts, new _Directive (type, annotation));
49
49
} else {
@@ -97,12 +97,12 @@ class DirectiveSelector {
97
97
// this directive is matched on any attribute name, and so
98
98
// we need to pass the name to the directive by prefixing it to
99
99
// the value. Yes it is a bit of a hack.
100
- _directives[selectorRegExp.annotation ].forEach ((type ) {
100
+ _directives[selectorRegExp.selector ].forEach ((DirectiveTypeTuple tuple ) {
101
101
// Pre-compute the AST to watch this value.
102
102
String expression = _interpolate (value);
103
103
AST valueAST = _astParser (expression, formatters: _formatters);
104
104
builder.addDirective (new DirectiveRef (
105
- node, type, selectorRegExp.annotation , new Key (type), attrName, valueAST));
105
+ node, tuple. type, tuple.directive , new Key (tuple. type), attrName, valueAST));
106
106
});
107
107
}
108
108
}
@@ -135,13 +135,13 @@ class DirectiveSelector {
135
135
for (var k = 0 ; k < textSelector.length; k++ ) {
136
136
var selectorRegExp = textSelector[k];
137
137
if (selectorRegExp.regexp.hasMatch (value)) {
138
- _directives[selectorRegExp.annotation ].forEach ((type ) {
138
+ _directives[selectorRegExp.selector ].forEach ((tuple ) {
139
139
// Pre-compute the AST to watch this value.
140
140
String expression = _interpolate (value);
141
141
var valueAST = _astParser (expression, formatters: _formatters);
142
142
143
- builder.addDirective (new DirectiveRef (node, type,
144
- selectorRegExp.annotation , new Key (type), value, valueAST));
143
+ builder.addDirective (new DirectiveRef (node, tuple. type,
144
+ tuple.directive , new Key (tuple. type), value, valueAST));
145
145
});
146
146
}
147
147
}
@@ -187,10 +187,10 @@ class _Directive {
187
187
}
188
188
189
189
class _ContainsSelector {
190
- final Directive annotation ;
190
+ final String selector ;
191
191
final RegExp regexp;
192
192
193
- _ContainsSelector (this .annotation , String regexp)
193
+ _ContainsSelector (this .selector , String regexp)
194
194
: regexp = new RegExp (regexp);
195
195
}
196
196
0 commit comments