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

Side by Side Diff: pkg/analyzer/lib/src/generated/ast.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
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 // 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.ast; 8 library engine.ast;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 12387 matching lines...) Expand 10 before | Expand all | Expand 10 after
12398 * Search within the given AST [node] for an identifier representing an 12398 * Search within the given AST [node] for an identifier representing an
12399 * element in the specified source range. Return the element that was found, 12399 * element in the specified source range. Return the element that was found,
12400 * or `null` if no element was found. 12400 * or `null` if no element was found.
12401 */ 12401 */
12402 AstNode searchWithin(AstNode node) { 12402 AstNode searchWithin(AstNode node) {
12403 if (node == null) { 12403 if (node == null) {
12404 return null; 12404 return null;
12405 } 12405 }
12406 try { 12406 try {
12407 node.accept(this); 12407 node.accept(this);
12408 } on NodeLocator_NodeFoundException catch (exception) { 12408 } on NodeLocator_NodeFoundException {
12409 // A node with the right source position was found. 12409 // A node with the right source position was found.
12410 } catch (exception, stackTrace) { 12410 } catch (exception, stackTrace) {
12411 AnalysisEngine.instance.logger.logInformation( 12411 AnalysisEngine.instance.logger.logInformation(
12412 "Unable to locate element at offset ($_startOffset - $_endOffset)", 12412 "Unable to locate element at offset ($_startOffset - $_endOffset)",
12413 new CaughtException(exception, stackTrace)); 12413 new CaughtException(exception, stackTrace));
12414 return null; 12414 return null;
12415 } 12415 }
12416 return _foundNode; 12416 return _foundNode;
12417 } 12417 }
12418 12418
12419 @override 12419 @override
12420 Object visitNode(AstNode node) { 12420 Object visitNode(AstNode node) {
12421 int start = node.offset; 12421 int start = node.offset;
12422 int end = start + node.length; 12422 int end = start + node.length;
12423 if (end < _startOffset) { 12423 if (end < _startOffset) {
12424 return null; 12424 return null;
12425 } 12425 }
12426 if (start > _endOffset) { 12426 if (start > _endOffset) {
12427 return null; 12427 return null;
12428 } 12428 }
12429 try { 12429 try {
12430 node.visitChildren(this); 12430 node.visitChildren(this);
12431 } on NodeLocator_NodeFoundException catch (exception) { 12431 } on NodeLocator_NodeFoundException {
12432 rethrow; 12432 rethrow;
12433 } catch (exception, stackTrace) { 12433 } catch (exception, stackTrace) {
12434 // Ignore the exception and proceed in order to visit the rest of the 12434 // Ignore the exception and proceed in order to visit the rest of the
12435 // structure. 12435 // structure.
12436 AnalysisEngine.instance.logger.logInformation( 12436 AnalysisEngine.instance.logger.logInformation(
12437 "Exception caught while traversing an AST structure.", 12437 "Exception caught while traversing an AST structure.",
12438 new CaughtException(exception, stackTrace)); 12438 new CaughtException(exception, stackTrace));
12439 } 12439 }
12440 if (start <= _startOffset && _endOffset <= end) { 12440 if (start <= _startOffset && _endOffset <= end) {
12441 _foundNode = node; 12441 _foundNode = node;
(...skipping 4298 matching lines...) Expand 10 before | Expand all | Expand 10 after
16740 */ 16740 */
16741 abstract class StringLiteral extends Literal { 16741 abstract class StringLiteral extends Literal {
16742 /** 16742 /**
16743 * Return the value of the string literal, or `null` if the string is not a 16743 * Return the value of the string literal, or `null` if the string is not a
16744 * constant string without any string interpolation. 16744 * constant string without any string interpolation.
16745 */ 16745 */
16746 String get stringValue { 16746 String get stringValue {
16747 StringBuffer buffer = new StringBuffer(); 16747 StringBuffer buffer = new StringBuffer();
16748 try { 16748 try {
16749 _appendStringValue(buffer); 16749 _appendStringValue(buffer);
16750 } on IllegalArgumentException catch (exception) { 16750 } on IllegalArgumentException {
16751 return null; 16751 return null;
16752 } 16752 }
16753 return buffer.toString(); 16753 return buffer.toString();
16754 } 16754 }
16755 16755
16756 /** 16756 /**
16757 * Append the value of this string literal to the given [buffer]. Throw an 16757 * Append the value of this string literal to the given [buffer]. Throw an
16758 * [IllegalArgumentException] if the string is not a constant string without 16758 * [IllegalArgumentException] if the string is not a constant string without
16759 * any string interpolation. 16759 * any string interpolation.
16760 */ 16760 */
(...skipping 2751 matching lines...) Expand 10 before | Expand all | Expand 10 after
19512 } 19512 }
19513 String uriContent = this.uriContent; 19513 String uriContent = this.uriContent;
19514 if (uriContent == null) { 19514 if (uriContent == null) {
19515 return UriValidationCode.INVALID_URI; 19515 return UriValidationCode.INVALID_URI;
19516 } 19516 }
19517 if (this is ImportDirective && uriContent.startsWith(_DART_EXT_SCHEME)) { 19517 if (this is ImportDirective && uriContent.startsWith(_DART_EXT_SCHEME)) {
19518 return UriValidationCode.URI_WITH_DART_EXT_SCHEME; 19518 return UriValidationCode.URI_WITH_DART_EXT_SCHEME;
19519 } 19519 }
19520 try { 19520 try {
19521 parseUriWithException(Uri.encodeFull(uriContent)); 19521 parseUriWithException(Uri.encodeFull(uriContent));
19522 } on URISyntaxException catch (exception) { 19522 } on URISyntaxException {
19523 return UriValidationCode.INVALID_URI; 19523 return UriValidationCode.INVALID_URI;
19524 } 19524 }
19525 return null; 19525 return null;
19526 } 19526 }
19527 19527
19528 @override 19528 @override
19529 void visitChildren(AstVisitor visitor) { 19529 void visitChildren(AstVisitor visitor) {
19530 super.visitChildren(visitor); 19530 super.visitChildren(visitor);
19531 _safelyVisitChild(_uri, visitor); 19531 _safelyVisitChild(_uri, visitor);
19532 } 19532 }
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
20096 } 20096 }
20097 20097
20098 @override 20098 @override
20099 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); 20099 accept(AstVisitor visitor) => visitor.visitYieldStatement(this);
20100 20100
20101 @override 20101 @override
20102 void visitChildren(AstVisitor visitor) { 20102 void visitChildren(AstVisitor visitor) {
20103 _safelyVisitChild(_expression, visitor); 20103 _safelyVisitChild(_expression, visitor);
20104 } 20104 }
20105 } 20105 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/file_system/memory_file_system.dart ('k') | pkg/analyzer/lib/src/generated/constant.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698