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

Side by Side Diff: pkg/analyzer/lib/src/generated/constant.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/ast.dart ('k') | pkg/analyzer/lib/src/generated/engine.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 // 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.constant; 8 library engine.constant;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 2659 matching lines...) Expand 10 before | Expand all | Expand 10 after
2670 * parsed as an integer, a DartObject representing 'null' is returned. 2670 * parsed as an integer, a DartObject representing 'null' is returned.
2671 */ 2671 */
2672 DartObject getInt(TypeProvider typeProvider, String name) { 2672 DartObject getInt(TypeProvider typeProvider, String name) {
2673 String value = _declaredVariables[name]; 2673 String value = _declaredVariables[name];
2674 if (value == null) { 2674 if (value == null) {
2675 return new DartObjectImpl(typeProvider.intType, IntState.UNKNOWN_VALUE); 2675 return new DartObjectImpl(typeProvider.intType, IntState.UNKNOWN_VALUE);
2676 } 2676 }
2677 int bigInteger; 2677 int bigInteger;
2678 try { 2678 try {
2679 bigInteger = int.parse(value); 2679 bigInteger = int.parse(value);
2680 } on FormatException catch (exception) { 2680 } on FormatException {
2681 return new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE); 2681 return new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE);
2682 } 2682 }
2683 return new DartObjectImpl(typeProvider.intType, new IntState(bigInteger)); 2683 return new DartObjectImpl(typeProvider.intType, new IntState(bigInteger));
2684 } 2684 }
2685 2685
2686 /** 2686 /**
2687 * Return the value of the variable with the given [name] interpreted as a 2687 * Return the value of the variable with the given [name] interpreted as a
2688 * String value, or `null` if the variable is not defined. Return the value of 2688 * String value, or `null` if the variable is not defined. Return the value of
2689 * the variable with the given name interpreted as a String value. If the 2689 * the variable with the given name interpreted as a String value. If the
2690 * variable is not defined (or [name] is `null`), a DartObject representing 2690 * variable is not defined (or [name] is `null`), a DartObject representing
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after
5077 return BoolState.from(_element == rightElement); 5077 return BoolState.from(_element == rightElement);
5078 } else if (rightOperand is DynamicState) { 5078 } else if (rightOperand is DynamicState) {
5079 return BoolState.UNKNOWN_VALUE; 5079 return BoolState.UNKNOWN_VALUE;
5080 } 5080 }
5081 return BoolState.FALSE_STATE; 5081 return BoolState.FALSE_STATE;
5082 } 5082 }
5083 5083
5084 @override 5084 @override
5085 String toString() => _element == null ? "-unknown-" : _element.name; 5085 String toString() => _element == null ? "-unknown-" : _element.name;
5086 } 5086 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698