Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine; | 8 library engine; |
| 9 | 9 |
| 10 import "dart:math" as math; | 10 import "dart:math" as math; |
| (...skipping 2901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2912 _incrementalAnalysisCache = IncrementalAnalysisCache.clear(_incrementalAna lysisCache, source); | 2912 _incrementalAnalysisCache = IncrementalAnalysisCache.clear(_incrementalAna lysisCache, source); |
| 2913 _sourceChanged(source); | 2913 _sourceChanged(source); |
| 2914 changed = true; | 2914 changed = true; |
| 2915 } | 2915 } |
| 2916 return changed; | 2916 return changed; |
| 2917 } | 2917 } |
| 2918 | 2918 |
| 2919 /** | 2919 /** |
| 2920 * Create a [BuildUnitElementTask] for the given [source]. | 2920 * Create a [BuildUnitElementTask] for the given [source]. |
| 2921 */ | 2921 */ |
| 2922 AnalysisContextImpl_TaskData _createBuildUnitElementTask(Source source, | 2922 // AnalysisContextImpl_TaskData _createBuildUnitElementTask(Source source, |
|
Brian Wilkerson
2014/11/19 16:08:52
I don't know how our sorter deals with comments, b
scheglov
2014/11/19 17:30:19
The sorter ignores comments, it reorders complete
| |
| 2923 DartEntry dartEntry, Source librarySource) { | 2923 // DartEntry dartEntry, Source librarySource) { |
| 2924 CompilationUnit unit = dartEntry.resolvableCompilationUnit; | 2924 // CompilationUnit unit = dartEntry.resolvableCompilationUnit; |
| 2925 if (unit == null) { | 2925 // if (unit == null) { |
| 2926 return _createParseDartTask(source, dartEntry); | 2926 // return _createParseDartTask(source, dartEntry); |
| 2927 } | 2927 // } |
| 2928 return new AnalysisContextImpl_TaskData( | 2928 // return new AnalysisContextImpl_TaskData( |
| 2929 new BuildUnitElementTask(this, source, librarySource, unit), | 2929 // new BuildUnitElementTask(this, source, librarySource, unit), |
| 2930 false); | 2930 // false); |
| 2931 } | 2931 // } |
| 2932 | 2932 |
| 2933 /** | 2933 /** |
| 2934 * Create a [GenerateDartErrorsTask] for the given source, marking the verific ation errors | 2934 * Create a [GenerateDartErrorsTask] for the given source, marking the verific ation errors |
| 2935 * as being in-process. The compilation unit and the library can be the same i f the compilation | 2935 * as being in-process. The compilation unit and the library can be the same i f the compilation |
| 2936 * unit is the defining compilation unit of the library. | 2936 * unit is the defining compilation unit of the library. |
| 2937 * | 2937 * |
| 2938 * @param unitSource the source for the compilation unit to be verified | 2938 * @param unitSource the source for the compilation unit to be verified |
| 2939 * @param unitEntry the entry for the compilation unit | 2939 * @param unitEntry the entry for the compilation unit |
| 2940 * @param librarySource the source for the library containing the compilation unit | 2940 * @param librarySource the source for the library containing the compilation unit |
| 2941 * @param libraryEntry the entry for the library | 2941 * @param libraryEntry the entry for the library |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4212 _listeners[i].computedErrors(this, source, errors, lineInfo); | 4212 _listeners[i].computedErrors(this, source, errors, lineInfo); |
| 4213 } | 4213 } |
| 4214 } | 4214 } |
| 4215 | 4215 |
| 4216 /** | 4216 /** |
| 4217 * Notify all of the analysis listeners that the given source is no longer inc luded in the set of | 4217 * Notify all of the analysis listeners that the given source is no longer inc luded in the set of |
| 4218 * sources that are being analyzed. | 4218 * sources that are being analyzed. |
| 4219 * | 4219 * |
| 4220 * @param source the source that is no longer being analyzed | 4220 * @param source the source that is no longer being analyzed |
| 4221 */ | 4221 */ |
| 4222 void _notifyExcludedSource(Source source) { | 4222 // void _notifyExcludedSource(Source source) { |
| 4223 int count = _listeners.length; | 4223 // int count = _listeners.length; |
| 4224 for (int i = 0; i < count; i++) { | 4224 // for (int i = 0; i < count; i++) { |
| 4225 _listeners[i].excludedSource(this, source); | 4225 // _listeners[i].excludedSource(this, source); |
| 4226 } | 4226 // } |
| 4227 } | 4227 // } |
| 4228 | 4228 |
| 4229 /** | 4229 /** |
| 4230 * Notify all of the analysis listeners that the given source is now included in the set of | 4230 * Notify all of the analysis listeners that the given source is now included in the set of |
| 4231 * sources that are being analyzed. | 4231 * sources that are being analyzed. |
| 4232 * | 4232 * |
| 4233 * @param source the source that is now being analyzed | 4233 * @param source the source that is now being analyzed |
| 4234 */ | 4234 */ |
| 4235 void _notifyIncludedSource(Source source) { | 4235 // void _notifyIncludedSource(Source source) { |
| 4236 int count = _listeners.length; | 4236 // int count = _listeners.length; |
| 4237 for (int i = 0; i < count; i++) { | 4237 // for (int i = 0; i < count; i++) { |
| 4238 _listeners[i].includedSource(this, source); | 4238 // _listeners[i].includedSource(this, source); |
| 4239 } | 4239 // } |
| 4240 } | 4240 // } |
| 4241 | 4241 |
| 4242 /** | 4242 /** |
| 4243 * Notify all of the analysis listeners that the given Dart source was parsed. | 4243 * Notify all of the analysis listeners that the given Dart source was parsed. |
| 4244 * | 4244 * |
| 4245 * @param source the source that was parsed | 4245 * @param source the source that was parsed |
| 4246 * @param unit the result of parsing the source | 4246 * @param unit the result of parsing the source |
| 4247 */ | 4247 */ |
| 4248 void _notifyParsedDart(Source source, CompilationUnit unit) { | 4248 // void _notifyParsedDart(Source source, CompilationUnit unit) { |
| 4249 int count = _listeners.length; | 4249 // int count = _listeners.length; |
| 4250 for (int i = 0; i < count; i++) { | 4250 // for (int i = 0; i < count; i++) { |
| 4251 _listeners[i].parsedDart(this, source, unit); | 4251 // _listeners[i].parsedDart(this, source, unit); |
| 4252 } | 4252 // } |
| 4253 } | 4253 // } |
| 4254 | 4254 |
| 4255 /** | 4255 /** |
| 4256 * Notify all of the analysis listeners that the given HTML source was parsed. | 4256 * Notify all of the analysis listeners that the given HTML source was parsed. |
| 4257 * | 4257 * |
| 4258 * @param source the source that was parsed | 4258 * @param source the source that was parsed |
| 4259 * @param unit the result of parsing the source | 4259 * @param unit the result of parsing the source |
| 4260 */ | 4260 */ |
| 4261 void _notifyParsedHtml(Source source, ht.HtmlUnit unit) { | 4261 // void _notifyParsedHtml(Source source, ht.HtmlUnit unit) { |
| 4262 int count = _listeners.length; | 4262 // int count = _listeners.length; |
| 4263 for (int i = 0; i < count; i++) { | 4263 // for (int i = 0; i < count; i++) { |
| 4264 _listeners[i].parsedHtml(this, source, unit); | 4264 // _listeners[i].parsedHtml(this, source, unit); |
| 4265 } | 4265 // } |
| 4266 } | 4266 // } |
| 4267 | 4267 |
| 4268 /** | 4268 /** |
| 4269 * Notify all of the analysis listeners that the given Dart source was resolve d. | 4269 * Notify all of the analysis listeners that the given Dart source was resolve d. |
| 4270 * | 4270 * |
| 4271 * @param source the source that was resolved | 4271 * @param source the source that was resolved |
| 4272 * @param unit the result of resolving the source | 4272 * @param unit the result of resolving the source |
| 4273 */ | 4273 */ |
| 4274 void _notifyResolvedDart(Source source, CompilationUnit unit) { | 4274 // void _notifyResolvedDart(Source source, CompilationUnit unit) { |
| 4275 int count = _listeners.length; | 4275 // int count = _listeners.length; |
| 4276 for (int i = 0; i < count; i++) { | 4276 // for (int i = 0; i < count; i++) { |
| 4277 _listeners[i].resolvedDart(this, source, unit); | 4277 // _listeners[i].resolvedDart(this, source, unit); |
| 4278 } | 4278 // } |
| 4279 } | 4279 // } |
| 4280 | 4280 |
| 4281 /** | 4281 /** |
| 4282 * Notify all of the analysis listeners that the given HTML source was resolve d. | 4282 * Notify all of the analysis listeners that the given HTML source was resolve d. |
| 4283 * | 4283 * |
| 4284 * @param source the source that was resolved | 4284 * @param source the source that was resolved |
| 4285 * @param unit the result of resolving the source | 4285 * @param unit the result of resolving the source |
| 4286 */ | 4286 */ |
| 4287 void _notifyResolvedHtml(Source source, ht.HtmlUnit unit) { | 4287 // void _notifyResolvedHtml(Source source, ht.HtmlUnit unit) { |
| 4288 int count = _listeners.length; | 4288 // int count = _listeners.length; |
| 4289 for (int i = 0; i < count; i++) { | 4289 // for (int i = 0; i < count; i++) { |
| 4290 _listeners[i].resolvedHtml(this, source, unit); | 4290 // _listeners[i].resolvedHtml(this, source, unit); |
| 4291 } | 4291 // } |
| 4292 } | 4292 // } |
| 4293 | 4293 |
| 4294 /** | 4294 /** |
| 4295 * Updates [HtmlEntry]s that correspond to the previously known and new Angula r application | 4295 * Updates [HtmlEntry]s that correspond to the previously known and new Angula r application |
| 4296 * information. | 4296 * information. |
| 4297 */ | 4297 */ |
| 4298 void _recordAngularEntryPoint(HtmlEntry entry, | 4298 void _recordAngularEntryPoint(HtmlEntry entry, |
| 4299 ResolveAngularEntryHtmlTask task) { | 4299 ResolveAngularEntryHtmlTask task) { |
| 4300 AngularApplication application = task.application; | 4300 AngularApplication application = task.application; |
| 4301 if (application != null) { | 4301 if (application != null) { |
| 4302 _angularApplications.add(application); | 4302 _angularApplications.add(application); |
| (...skipping 2518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6821 TypeProvider _typeProvider; | 6821 TypeProvider _typeProvider; |
| 6822 | 6822 |
| 6823 AngularHtmlUnitResolver_FilteringAnalysisErrorListener _errorListener; | 6823 AngularHtmlUnitResolver_FilteringAnalysisErrorListener _errorListener; |
| 6824 | 6824 |
| 6825 final Source _source; | 6825 final Source _source; |
| 6826 | 6826 |
| 6827 final LineInfo _lineInfo; | 6827 final LineInfo _lineInfo; |
| 6828 | 6828 |
| 6829 final ht.HtmlUnit _unit; | 6829 final ht.HtmlUnit _unit; |
| 6830 | 6830 |
| 6831 List<AngularElement> _angularElements; | 6831 // List<AngularElement> _angularElements; |
| 6832 | 6832 |
| 6833 List<NgProcessor> _processors = <NgProcessor>[]; | 6833 List<NgProcessor> _processors = <NgProcessor>[]; |
| 6834 | 6834 |
| 6835 LibraryElementImpl _libraryElement; | 6835 LibraryElementImpl _libraryElement; |
| 6836 | 6836 |
| 6837 CompilationUnitElementImpl _unitElement; | 6837 CompilationUnitElementImpl _unitElement; |
| 6838 | 6838 |
| 6839 FunctionElementImpl _functionElement; | 6839 FunctionElementImpl _functionElement; |
| 6840 | 6840 |
| 6841 ResolverVisitor _resolver; | 6841 ResolverVisitor _resolver; |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7136 */ | 7136 */ |
| 7137 void _defineVariable(LocalVariableElementImpl variable) { | 7137 void _defineVariable(LocalVariableElementImpl variable) { |
| 7138 _recordDefinedVariable(variable); | 7138 _recordDefinedVariable(variable); |
| 7139 _nameScope.define(variable); | 7139 _nameScope.define(variable); |
| 7140 _recordTypeLibraryInjected(variable); | 7140 _recordTypeLibraryInjected(variable); |
| 7141 } | 7141 } |
| 7142 | 7142 |
| 7143 /** | 7143 /** |
| 7144 * @return the [AngularElement] with the given name, maybe `null`. | 7144 * @return the [AngularElement] with the given name, maybe `null`. |
| 7145 */ | 7145 */ |
| 7146 AngularElement _findAngularElement(String name) { | 7146 // AngularElement _findAngularElement(String name) { |
| 7147 for (AngularElement element in _angularElements) { | 7147 // for (AngularElement element in _angularElements) { |
| 7148 if (name == element.name) { | 7148 // if (name == element.name) { |
| 7149 return element; | 7149 // return element; |
| 7150 } | 7150 // } |
| 7151 } | 7151 // } |
| 7152 return null; | 7152 // return null; |
| 7153 } | 7153 // } |
| 7154 | 7154 |
| 7155 /** | 7155 /** |
| 7156 * Parses given [String] as an [AngularExpression] at the given offset. | 7156 * Parses given [String] as an [AngularExpression] at the given offset. |
| 7157 */ | 7157 */ |
| 7158 AngularExpression _parseAngularExpression(String contents, int startIndex, | 7158 AngularExpression _parseAngularExpression(String contents, int startIndex, |
| 7159 int endIndex, int offset) { | 7159 int endIndex, int offset) { |
| 7160 Token token = _scanDart(contents, startIndex, endIndex, offset); | 7160 Token token = _scanDart(contents, startIndex, endIndex, offset); |
| 7161 return _parseAngularExpressionInToken(token); | 7161 return _parseAngularExpressionInToken(token); |
| 7162 } | 7162 } |
| 7163 | 7163 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7197 } | 7197 } |
| 7198 formatters.add(new AngularFormatterNode(barToken, name, arguments)); | 7198 formatters.add(new AngularFormatterNode(barToken, name, arguments)); |
| 7199 } | 7199 } |
| 7200 // done | 7200 // done |
| 7201 return new AngularExpression(mainExpression, formatters); | 7201 return new AngularExpression(mainExpression, formatters); |
| 7202 } | 7202 } |
| 7203 | 7203 |
| 7204 /** | 7204 /** |
| 7205 * Parses given [String] as an [Expression] at the given offset. | 7205 * Parses given [String] as an [Expression] at the given offset. |
| 7206 */ | 7206 */ |
| 7207 Expression _parseDartExpression(String contents, int startIndex, int endIndex, | 7207 // Expression _parseDartExpression(String contents, int startIndex, int endInde x, |
| 7208 int offset) { | 7208 // int offset) { |
| 7209 Token token = _scanDart(contents, startIndex, endIndex, offset); | 7209 // Token token = _scanDart(contents, startIndex, endIndex, offset); |
| 7210 return _parseDartExpressionInToken(token); | 7210 // return _parseDartExpressionInToken(token); |
| 7211 } | 7211 // } |
| 7212 | 7212 |
| 7213 Expression _parseDartExpressionInToken(Token token) { | 7213 Expression _parseDartExpressionInToken(Token token) { |
| 7214 Parser parser = new Parser(_source, _errorListener); | 7214 Parser parser = new Parser(_source, _errorListener); |
| 7215 return parser.parseExpression(token); | 7215 return parser.parseExpression(token); |
| 7216 } | 7216 } |
| 7217 | 7217 |
| 7218 /** | 7218 /** |
| 7219 * Parse the value of the given token for embedded expressions, and add any em bedded expressions | 7219 * Parse the value of the given token for embedded expressions, and add any em bedded expressions |
| 7220 * that are found to the given list of expressions. | 7220 * that are found to the given list of expressions. |
| 7221 * | 7221 * |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7362 /** | 7362 /** |
| 7363 * Resolves Angular specific expressions and elements in the [source]. | 7363 * Resolves Angular specific expressions and elements in the [source]. |
| 7364 * | 7364 * |
| 7365 * @param angularElements the [AngularElement]s accessible in the component's library, not | 7365 * @param angularElements the [AngularElement]s accessible in the component's library, not |
| 7366 * `null` | 7366 * `null` |
| 7367 * @param component the [AngularComponentElement] to resolve template for, may be | 7367 * @param component the [AngularComponentElement] to resolve template for, may be |
| 7368 * `null` if not a component template | 7368 * `null` if not a component template |
| 7369 */ | 7369 */ |
| 7370 void _resolveInternal(List<AngularElement> angularElements, | 7370 void _resolveInternal(List<AngularElement> angularElements, |
| 7371 AngularComponentElement component) { | 7371 AngularComponentElement component) { |
| 7372 this._angularElements = angularElements; | 7372 // this._angularElements = angularElements; |
| 7373 // add built-in processors | 7373 // add built-in processors |
| 7374 _processors.add(NgModelProcessor.INSTANCE); | 7374 _processors.add(NgModelProcessor.INSTANCE); |
| 7375 // _processors.add(NgRepeatProcessor.INSTANCE); | 7375 // _processors.add(NgRepeatProcessor.INSTANCE); |
| 7376 // add element's libraries | 7376 // add element's libraries |
| 7377 for (AngularElement angularElement in angularElements) { | 7377 for (AngularElement angularElement in angularElements) { |
| 7378 _injectedLibraries.add(angularElement.library); | 7378 _injectedLibraries.add(angularElement.library); |
| 7379 } | 7379 } |
| 7380 // prepare Dart library | 7380 // prepare Dart library |
| 7381 _createLibraryElement(); | 7381 _createLibraryElement(); |
| 7382 (_unit.element as HtmlElementImpl).angularCompilationUnit = _unitElement; | 7382 (_unit.element as HtmlElementImpl).angularCompilationUnit = _unitElement; |
| (...skipping 7422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 14805 | 14805 |
| 14806 @override | 14806 @override |
| 14807 Object visitPolymerTagDartElement(PolymerTagDartElement element) { | 14807 Object visitPolymerTagDartElement(PolymerTagDartElement element) { |
| 14808 if (element.name == PolymerHtmlUnitBuilder_this._elementName) { | 14808 if (element.name == PolymerHtmlUnitBuilder_this._elementName) { |
| 14809 throw new PolymerHtmlUnitBuilder_FoundTagDartElementError( | 14809 throw new PolymerHtmlUnitBuilder_FoundTagDartElementError( |
| 14810 element as PolymerTagDartElementImpl); | 14810 element as PolymerTagDartElementImpl); |
| 14811 } | 14811 } |
| 14812 return null; | 14812 return null; |
| 14813 } | 14813 } |
| 14814 } | 14814 } |
| OLD | NEW |