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

Side by Side Diff: reflectable/lib/transformer.dart

Issue 1473073009: Added `dynamicReflected..Type`, corrected type expressions. (Closed) Base URL: https://github.com/dart-lang/reflectable.git@master
Patch Set: Review response. Created 5 years 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
OLDNEW
1 // Copyright (c) 2015, the Dart Team. All rights reserved. Use of this 1 // Copyright (c) 2015, the Dart Team. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in 2 // source code is governed by a BSD-style license that can be found in
3 // the LICENSE file. 3 // the LICENSE file.
4 4
5 library reflectable.transformer; 5 library reflectable.transformer;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'package:barback/barback.dart'; 9 import 'package:barback/barback.dart';
10 import 'package:logging/logging.dart'; 10 import 'package:logging/logging.dart';
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 /// Creates new instance as required by Barback. 118 /// Creates new instance as required by Barback.
119 ReflectableTransformer.asPlugin(this._settings) { 119 ReflectableTransformer.asPlugin(this._settings) {
120 _entryPoints = _findEntryPoints(_settings.configuration['entry_points']); 120 _entryPoints = _findEntryPoints(_settings.configuration['entry_points']);
121 _formatted = _findFormatted(_settings.configuration['formatted']); 121 _formatted = _findFormatted(_settings.configuration['formatted']);
122 _suppressWarnings = 122 _suppressWarnings =
123 _findSuppressWarnings(_settings.configuration['suppressWarnings']); 123 _findSuppressWarnings(_settings.configuration['suppressWarnings']);
124 } 124 }
125 125
126 /// Return a [String] or [Future<String>] valued key for each 126 /// Returns a [String] or [Future<String>] valued key for each
127 /// primary asset that this transformer wishes to process, and 127 /// primary asset that this transformer wishes to process, and
128 /// null for assets that it wishes to ignore. Primary assets 128 /// null for assets that it wishes to ignore. Primary assets
129 /// with the same key are delivered to [apply] as a group. In 129 /// with the same key are delivered to [apply] as a group. In
130 /// this transformer we handle the grouping later, so everything 130 /// this transformer we handle the grouping later, so everything
131 /// is in the same group. 131 /// is in the same group.
132 String classifyPrimary(AssetId id) { 132 String classifyPrimary(AssetId id) {
133 return _entryPoints.any((entryPoint) => id.path.endsWith(entryPoint)) 133 return _entryPoints.any((entryPoint) => id.path.endsWith(entryPoint))
134 ? "ReflectableTransformed" 134 ? "ReflectableTransformed"
135 : null; 135 : null;
136 } 136 }
(...skipping 16 matching lines...) Expand all
153 // any diagnostic messages, this is done by `apply` in 153 // any diagnostic messages, this is done by `apply` in
154 // `TransformerImplementation`. 154 // `TransformerImplementation`.
155 return; 155 return;
156 } 156 }
157 transform.declareOutput(id); 157 transform.declareOutput(id);
158 AssetId dataId = id.changeExtension("_reflectable_original_main.dart"); 158 AssetId dataId = id.changeExtension("_reflectable_original_main.dart");
159 transform.declareOutput(dataId); 159 transform.declareOutput(dataId);
160 }); 160 });
161 } 161 }
162 } 162 }
OLDNEW
« no previous file with comments | « reflectable/lib/src/transformer_implementation.dart ('k') | reflectable/test/mock_tests/check_literal_transform_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698