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

Side by Side Diff: pkg/observe/lib/transformer.dart

Issue 157583007: Removing polymer-specific code from barback runner (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/polymer/lib/builder.dart » ('j') | pkg/polymer/lib/src/build/runner.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * Code transform for @observable. The core transformation is relatively 6 * Code transform for @observable. The core transformation is relatively
7 * straightforward, and essentially like an editor refactoring. 7 * straightforward, and essentially like an editor refactoring.
8 */ 8 */
9 library observe.transformer; 9 library observe.transformer;
10 10
(...skipping 10 matching lines...) Expand all
21 /** 21 /**
22 * A [Transformer] that replaces observables based on dirty-checking with an 22 * A [Transformer] that replaces observables based on dirty-checking with an
23 * implementation based on change notifications. 23 * implementation based on change notifications.
24 * 24 *
25 * The transformation adds hooks for field setters and notifies the observation 25 * The transformation adds hooks for field setters and notifies the observation
26 * system of the change. 26 * system of the change.
27 */ 27 */
28 class ObservableTransformer extends Transformer { 28 class ObservableTransformer extends Transformer {
29 29
30 final List<String> _files; 30 final List<String> _files;
31 ObservableTransformer() : _files = null; 31 ObservableTransformer([List<String> files]) : _files = files;
32 ObservableTransformer.asPlugin(BarbackSettings settings) 32 ObservableTransformer.asPlugin(BarbackSettings settings)
33 : _files = _readFiles(settings.configuration['files']); 33 : _files = _readFiles(settings.configuration['files']);
34 34
35 static List<String> _readFiles(value) { 35 static List<String> _readFiles(value) {
36 if (value == null) return null; 36 if (value == null) return null;
37 var files = []; 37 var files = [];
38 bool error; 38 bool error;
39 if (value is List) { 39 if (value is List) {
40 files = value; 40 files = value;
41 error = value.any((e) => e is! String); 41 error = value.any((e) => e is! String);
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 Token _findFieldSeperator(Token token) { 431 Token _findFieldSeperator(Token token) {
432 while (token != null) { 432 while (token != null) {
433 if (token.type == TokenType.COMMA || token.type == TokenType.SEMICOLON) { 433 if (token.type == TokenType.COMMA || token.type == TokenType.SEMICOLON) {
434 break; 434 break;
435 } 435 }
436 token = token.next; 436 token = token.next;
437 } 437 }
438 return token; 438 return token;
439 } 439 }
OLDNEW
« no previous file with comments | « no previous file | pkg/polymer/lib/builder.dart » ('j') | pkg/polymer/lib/src/build/runner.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698