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

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

Issue 681003002: Replace ${name} with $name where possible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up also implementation Created 6 years, 1 month 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/element.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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 static String _PUBLIC_IDENTIFIER_RE = "(?!${ConstantValueComputer._RESERVED_WO RD_RE}\\b(?!\\\$))[a-zA-Z\$][\\w\$]*"; 299 static String _PUBLIC_IDENTIFIER_RE = "(?!${ConstantValueComputer._RESERVED_WO RD_RE}\\b(?!\\\$))[a-zA-Z\$][\\w\$]*";
300 300
301 /** 301 /**
302 * Source of RegExp matching Dart reserved words. From sdk/lib/internal/symbol .dart. 302 * Source of RegExp matching Dart reserved words. From sdk/lib/internal/symbol .dart.
303 */ 303 */
304 static String _RESERVED_WORD_RE = "(?:assert|break|c(?:a(?:se|tch)|lass|on(?:s t|tinue))|d(?:efault|o)|e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?: ew|ull)|ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|v(?:ar|oid)|w (?:hile|ith))"; 304 static String _RESERVED_WORD_RE = "(?:assert|break|c(?:a(?:se|tch)|lass|on(?:s t|tinue))|d(?:efault|o)|e(?:lse|num|xtends)|f(?:alse|inal(?:ly)?|or)|i[fns]|n(?: ew|ull)|ret(?:hrow|urn)|s(?:uper|witch)|t(?:h(?:is|row)|r(?:ue|y))|v(?:ar|oid)|w (?:hile|ith))";
305 305
306 /** 306 /**
307 * RegExp that validates a non-empty non-private symbol. From sdk/lib/internal /symbol.dart. 307 * RegExp that validates a non-empty non-private symbol. From sdk/lib/internal /symbol.dart.
308 */ 308 */
309 static RegExp _PUBLIC_SYMBOL_PATTERN = new RegExp("^(?:${ConstantValueComputer ._OPERATOR_RE}\$|${_PUBLIC_IDENTIFIER_RE}(?:=?\$|[.](?!\$)))+?\$"); 309 static RegExp _PUBLIC_SYMBOL_PATTERN = new RegExp("^(?:${ConstantValueComputer ._OPERATOR_RE}\$|$_PUBLIC_IDENTIFIER_RE(?:=?\$|[.](?!\$)))+?\$");
310 310
311 /** 311 /**
312 * Determine whether the given string is a valid name for a public symbol (i.e . whether it is 312 * Determine whether the given string is a valid name for a public symbol (i.e . whether it is
313 * allowed for a call to the Symbol constructor). 313 * allowed for a call to the Symbol constructor).
314 */ 314 */
315 static bool isValidPublicSymbol(String name) => name.isEmpty || name == "void" || new JavaPatternMatcher(_PUBLIC_SYMBOL_PATTERN, name).matches(); 315 static bool isValidPublicSymbol(String name) => name.isEmpty || name == "void" || new JavaPatternMatcher(_PUBLIC_SYMBOL_PATTERN, name).matches();
316 316
317 /** 317 /**
318 * The type provider used to access the known types. 318 * The type provider used to access the known types.
319 */ 319 */
(...skipping 4199 matching lines...) Expand 10 before | Expand all | Expand 10 after
4519 @override 4519 @override
4520 StringState concatenate(InstanceState rightOperand) { 4520 StringState concatenate(InstanceState rightOperand) {
4521 if (value == null) { 4521 if (value == null) {
4522 return UNKNOWN_VALUE; 4522 return UNKNOWN_VALUE;
4523 } 4523 }
4524 if (rightOperand is StringState) { 4524 if (rightOperand is StringState) {
4525 String rightValue = rightOperand.value; 4525 String rightValue = rightOperand.value;
4526 if (rightValue == null) { 4526 if (rightValue == null) {
4527 return UNKNOWN_VALUE; 4527 return UNKNOWN_VALUE;
4528 } 4528 }
4529 return new StringState("${value}${rightValue}"); 4529 return new StringState("$value$rightValue");
4530 } else if (rightOperand is DynamicState) { 4530 } else if (rightOperand is DynamicState) {
4531 return UNKNOWN_VALUE; 4531 return UNKNOWN_VALUE;
4532 } 4532 }
4533 return super.concatenate(rightOperand); 4533 return super.concatenate(rightOperand);
4534 } 4534 }
4535 4535
4536 @override 4536 @override
4537 StringState convertToString() => this; 4537 StringState convertToString() => this;
4538 4538
4539 @override 4539 @override
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
4574 4574
4575 @override 4575 @override
4576 IntState stringLength() { 4576 IntState stringLength() {
4577 if (value == null) { 4577 if (value == null) {
4578 return IntState.UNKNOWN_VALUE; 4578 return IntState.UNKNOWN_VALUE;
4579 } 4579 }
4580 return new IntState(value.length); 4580 return new IntState(value.length);
4581 } 4581 }
4582 4582
4583 @override 4583 @override
4584 String toString() => value == null ? "-unknown-" : "'${value}'"; 4584 String toString() => value == null ? "-unknown-" : "'$value'";
4585 } 4585 }
4586 4586
4587 /** 4587 /**
4588 * Instances of the class `StringState` represent the state of an object represe nting a 4588 * Instances of the class `StringState` represent the state of an object represe nting a
4589 * symbol. 4589 * symbol.
4590 */ 4590 */
4591 class SymbolState extends InstanceState { 4591 class SymbolState extends InstanceState {
4592 /** 4592 /**
4593 * The value of this instance. 4593 * The value of this instance.
4594 */ 4594 */
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
4633 @override 4633 @override
4634 String get typeName => "Symbol"; 4634 String get typeName => "Symbol";
4635 4635
4636 @override 4636 @override
4637 bool get hasExactValue => true; 4637 bool get hasExactValue => true;
4638 4638
4639 @override 4639 @override
4640 int get hashCode => value == null ? 0 : value.hashCode; 4640 int get hashCode => value == null ? 0 : value.hashCode;
4641 4641
4642 @override 4642 @override
4643 String toString() => value == null ? "-unknown-" : "#${value}"; 4643 String toString() => value == null ? "-unknown-" : "#$value";
4644 } 4644 }
4645 4645
4646 /** 4646 /**
4647 * Instances of the class `TypeState` represent the state of an object represent ing a type. 4647 * Instances of the class `TypeState` represent the state of an object represent ing a type.
4648 */ 4648 */
4649 class TypeState extends InstanceState { 4649 class TypeState extends InstanceState {
4650 /** 4650 /**
4651 * The element representing the type being modeled. 4651 * The element representing the type being modeled.
4652 */ 4652 */
4653 final Element _element; 4653 final Element _element;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
4690 4690
4691 @override 4691 @override
4692 String get typeName => "Type"; 4692 String get typeName => "Type";
4693 4693
4694 @override 4694 @override
4695 int get hashCode => _element == null ? 0 : _element.hashCode; 4695 int get hashCode => _element == null ? 0 : _element.hashCode;
4696 4696
4697 @override 4697 @override
4698 String toString() => _element == null ? "-unknown-" : _element.name; 4698 String toString() => _element == null ? "-unknown-" : _element.name;
4699 } 4699 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698