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

Side by Side Diff: pkg/polymer_expressions/lib/eval.dart

Issue 34453003: Rename mdv -> template_binding, remove experiemntal apis from dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library polymer_expressions.eval; 5 library polymer_expressions.eval;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 @MirrorsUsed(metaTargets: const [Reflectable, ObservableProperty], 10 @MirrorsUsed(metaTargets: const [Reflectable, ObservableProperty],
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 : super(value); 413 : super(value);
414 414
415 accept(Visitor v) => v.visitMapLiteralEntry(this); 415 accept(Visitor v) => v.visitMapLiteralEntry(this);
416 } 416 }
417 417
418 class IdentifierObserver extends ExpressionObserver<Identifier> 418 class IdentifierObserver extends ExpressionObserver<Identifier>
419 implements Identifier { 419 implements Identifier {
420 420
421 IdentifierObserver(Identifier value) : super(value); 421 IdentifierObserver(Identifier value) : super(value);
422 422
423 String get value => (_expr as Identifier).value; 423 String get value => _expr.value;
424 424
425 _updateSelf(Scope scope) { 425 _updateSelf(Scope scope) {
426 _value = scope[value]; 426 _value = scope[value];
427 427
428 var owner = scope.ownerOf(value); 428 var owner = scope.ownerOf(value);
429 if (owner is Observable) { 429 if (owner is Observable) {
430 var symbol = new Symbol(value); 430 var symbol = new Symbol(value);
431 _subscription = (owner as Observable).changes.listen((changes) { 431 _subscription = (owner as Observable).changes.listen((changes) {
432 if (changes.any( 432 if (changes.any(
433 (c) => c is PropertyChangeRecord && c.name == symbol)) { 433 (c) => c is PropertyChangeRecord && c.name == symbol)) {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 * This does not work for calls that need to pass more than one argument. 645 * This does not work for calls that need to pass more than one argument.
646 */ 646 */
647 call(arg0) => mirror.invoke(symbol, [arg0], null).reflectee; 647 call(arg0) => mirror.invoke(symbol, [arg0], null).reflectee;
648 } 648 }
649 649
650 class EvalException implements Exception { 650 class EvalException implements Exception {
651 final String message; 651 final String message;
652 EvalException(this.message); 652 EvalException(this.message);
653 String toString() => "EvalException: $message"; 653 String toString() => "EvalException: $message";
654 } 654 }
OLDNEW
« no previous file with comments | « pkg/polymer_expressions/example/streams/mouse_resize_image.html ('k') | pkg/polymer_expressions/lib/polymer_expressions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698