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

Side by Side Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1026093002: Fix hints in the analyzer package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/lib/src/generated/sdk_io.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library engine.resolver; 5 library engine.resolver;
6 6
7 import "dart:math" as math; 7 import "dart:math" as math;
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/src/generated/utilities_collection.dart'; 10 import 'package:analyzer/src/generated/utilities_collection.dart';
(...skipping 4724 matching lines...) Expand 10 before | Expand all | Expand 10 after
4735 // Force an exception to be thrown if the URI is invalid so that we 4735 // Force an exception to be thrown if the URI is invalid so that we
4736 // can report the problem. 4736 // can report the problem.
4737 parseUriWithException(scriptSourcePath); 4737 parseUriWithException(scriptSourcePath);
4738 Source scriptSource = 4738 Source scriptSource =
4739 _context.sourceFactory.resolveUri(htmlSource, scriptSourcePath); 4739 _context.sourceFactory.resolveUri(htmlSource, scriptSourcePath);
4740 script.scriptSource = scriptSource; 4740 script.scriptSource = scriptSource;
4741 if (!_context.exists(scriptSource)) { 4741 if (!_context.exists(scriptSource)) {
4742 _reportValueError(HtmlWarningCode.URI_DOES_NOT_EXIST, 4742 _reportValueError(HtmlWarningCode.URI_DOES_NOT_EXIST,
4743 scriptAttribute, [scriptSourcePath]); 4743 scriptAttribute, [scriptSourcePath]);
4744 } 4744 }
4745 } on URISyntaxException catch (exception) { 4745 } on URISyntaxException {
4746 _reportValueError(HtmlWarningCode.INVALID_URI, scriptAttribute, 4746 _reportValueError(HtmlWarningCode.INVALID_URI, scriptAttribute,
4747 [scriptSourcePath]); 4747 [scriptSourcePath]);
4748 } 4748 }
4749 } 4749 }
4750 node.scriptElement = script; 4750 node.scriptElement = script;
4751 _scripts.add(script); 4751 _scripts.add(script);
4752 } 4752 }
4753 } finally { 4753 } finally {
4754 _parentNodes.remove(node); 4754 _parentNodes.remove(node);
4755 } 4755 }
(...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after
6941 try { 6941 try {
6942 parseUriWithException(uriContent); 6942 parseUriWithException(uriContent);
6943 Source source = 6943 Source source =
6944 _analysisContext.sourceFactory.resolveUri(librarySource, uriContent); 6944 _analysisContext.sourceFactory.resolveUri(librarySource, uriContent);
6945 if (!_analysisContext.exists(source)) { 6945 if (!_analysisContext.exists(source)) {
6946 _errorListener.onError(new AnalysisError.con2(librarySource, 6946 _errorListener.onError(new AnalysisError.con2(librarySource,
6947 uriLiteral.offset, uriLiteral.length, 6947 uriLiteral.offset, uriLiteral.length,
6948 CompileTimeErrorCode.URI_DOES_NOT_EXIST, [uriContent])); 6948 CompileTimeErrorCode.URI_DOES_NOT_EXIST, [uriContent]));
6949 } 6949 }
6950 return source; 6950 return source;
6951 } on URISyntaxException catch (exception) { 6951 } on URISyntaxException {
6952 _errorListener.onError(new AnalysisError.con2(librarySource, 6952 _errorListener.onError(new AnalysisError.con2(librarySource,
6953 uriLiteral.offset, uriLiteral.length, 6953 uriLiteral.offset, uriLiteral.length,
6954 CompileTimeErrorCode.INVALID_URI, [uriContent])); 6954 CompileTimeErrorCode.INVALID_URI, [uriContent]));
6955 } 6955 }
6956 return null; 6956 return null;
6957 } 6957 }
6958 6958
6959 /** 6959 /**
6960 * Returns the URI value of the given directive. 6960 * Returns the URI value of the given directive.
6961 */ 6961 */
(...skipping 8426 matching lines...) Expand 10 before | Expand all | Expand 10 after
15388 } 15388 }
15389 15389
15390 bool isCatchException(LocalVariableElement element) { 15390 bool isCatchException(LocalVariableElement element) {
15391 return catchExceptionElements.contains(element); 15391 return catchExceptionElements.contains(element);
15392 } 15392 }
15393 15393
15394 bool isCatchStackTrace(LocalVariableElement element) { 15394 bool isCatchStackTrace(LocalVariableElement element) {
15395 return catchStackTraceElements.contains(element); 15395 return catchStackTraceElements.contains(element);
15396 } 15396 }
15397 } 15397 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/lib/src/generated/sdk_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698