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

Unified Diff: pkg/polymer/lib/src/build/script_compactor.dart

Issue 307793002: update polymer, nodebind, and templatebinding (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
Index: pkg/polymer/lib/src/build/script_compactor.dart
diff --git a/pkg/polymer/lib/src/build/script_compactor.dart b/pkg/polymer/lib/src/build/script_compactor.dart
index b633360cb27610da7432724910bb1394b32d6a52..7139722670fb1009060c71c3f64ab3e3aec1f7c3 100644
--- a/pkg/polymer/lib/src/build/script_compactor.dart
+++ b/pkg/polymer/lib/src/build/script_compactor.dart
@@ -506,20 +506,24 @@ class _HtmlExtractor extends TreeVisitor {
tag == 'textarea' && name == 'value');
}
for (var exp in bindings.expressions) {
- _addExpression(exp, isEvent, isTwoWay);
+ _addExpression(exp, isEvent, isTwoWay, node.sourceSpan);
}
});
}
- void _addExpression(String stringExpression, bool inEvent, bool isTwoWay) {
+ void _addExpression(String stringExpression, bool inEvent, bool isTwoWay,
+ SourceSpan span) {
+
if (inEvent) {
- if (!stringExpression.startsWith("@")) {
- if (stringExpression == '') return;
- generator.addGetter(stringExpression);
- generator.addSymbol(stringExpression);
+ if (stringExpression.startsWith('@')) {
+ logger.warning('event bindings with @ are no longer supported',
+ span: span);
return;
}
- stringExpression = stringExpression.substring(1);
+
+ if (stringExpression == '') return;
+ generator.addGetter(stringExpression);
+ generator.addSymbol(stringExpression);
}
visitor.run(pe.parse(stringExpression), isTwoWay);
}
@@ -701,7 +705,7 @@ List<ClassElement> _visibleClassesOf(LibraryElement lib) {
/// Retrieves all top-level methods that are visible if you were to import
/// [lib]. This includes exported methods from other libraries too.
-List<ClassElement> _visibleTopLevelMethodsOf(LibraryElement lib) {
+List<FunctionElement> _visibleTopLevelMethodsOf(LibraryElement lib) {
var result = [];
result.addAll(lib.units.expand((u) => u.functions));
for (var e in lib.exports) {

Powered by Google App Engine
This is Rietveld 408576698