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

Side by Side Diff: pkg/analyzer/lib/src/generated/parser.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
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.parser; 8 library engine.parser;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 2856 matching lines...) Expand 10 before | Expand all | Expand 10 after
2867 } 2867 }
2868 int end = lexeme.length; 2868 int end = lexeme.length;
2869 if (last) { 2869 if (last) {
2870 if (StringUtilities.endsWith3(lexeme, 0x22, 0x22, 0x22) || StringUtilities .endsWith3(lexeme, 0x27, 0x27, 0x27)) { 2870 if (StringUtilities.endsWith3(lexeme, 0x22, 0x22, 0x22) || StringUtilities .endsWith3(lexeme, 0x27, 0x27, 0x27)) {
2871 end -= 3; 2871 end -= 3;
2872 } else if (StringUtilities.endsWithChar(lexeme, 0x22) || StringUtilities.e ndsWithChar(lexeme, 0x27)) { 2872 } else if (StringUtilities.endsWithChar(lexeme, 0x22) || StringUtilities.e ndsWithChar(lexeme, 0x27)) {
2873 end -= 1; 2873 end -= 1;
2874 } 2874 }
2875 } 2875 }
2876 if (end - start + 1 < 0) { 2876 if (end - start + 1 < 0) {
2877 AnalysisEngine.instance.logger.logError("Internal error: computeStringValu e(${lexeme}, ${first}, ${last})"); 2877 AnalysisEngine.instance.logger.logError("Internal error: computeStringValu e($lexeme, $first, $last)");
2878 return ""; 2878 return "";
2879 } 2879 }
2880 if (isRaw) { 2880 if (isRaw) {
2881 return lexeme.substring(start, end); 2881 return lexeme.substring(start, end);
2882 } 2882 }
2883 StringBuffer buffer = new StringBuffer(); 2883 StringBuffer buffer = new StringBuffer();
2884 int index = start; 2884 int index = start;
2885 while (index < end) { 2885 while (index < end) {
2886 index = _translateCharacter(buffer, lexeme, index); 2886 index = _translateCharacter(buffer, lexeme, index);
2887 } 2887 }
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
4521 return _parseImportDirective(commentAndMetadata); 4521 return _parseImportDirective(commentAndMetadata);
4522 } else if (_matchesKeyword(Keyword.EXPORT)) { 4522 } else if (_matchesKeyword(Keyword.EXPORT)) {
4523 return _parseExportDirective(commentAndMetadata); 4523 return _parseExportDirective(commentAndMetadata);
4524 } else if (_matchesKeyword(Keyword.LIBRARY)) { 4524 } else if (_matchesKeyword(Keyword.LIBRARY)) {
4525 return _parseLibraryDirective(commentAndMetadata); 4525 return _parseLibraryDirective(commentAndMetadata);
4526 } else if (_matchesKeyword(Keyword.PART)) { 4526 } else if (_matchesKeyword(Keyword.PART)) {
4527 return _parsePartDirective(commentAndMetadata); 4527 return _parsePartDirective(commentAndMetadata);
4528 } else { 4528 } else {
4529 // Internal error: this method should not have been invoked if the current token was something 4529 // Internal error: this method should not have been invoked if the current token was something
4530 // other than one of the above. 4530 // other than one of the above.
4531 throw new IllegalStateException("parseDirective invoked in an invalid stat e; currentToken = ${_currentToken}"); 4531 throw new IllegalStateException("parseDirective invoked in an invalid stat e; currentToken = $_currentToken");
4532 } 4532 }
4533 } 4533 }
4534 4534
4535 /** 4535 /**
4536 * Parse the script tag and directives in a compilation unit until the first n on-directive is 4536 * Parse the script tag and directives in a compilation unit until the first n on-directive is
4537 * encountered. 4537 * encountered.
4538 * 4538 *
4539 * 4539 *
4540 * <pre> 4540 * <pre>
4541 * compilationUnit ::= 4541 * compilationUnit ::=
(...skipping 5010 matching lines...) Expand 10 before | Expand all | Expand 10 after
9552 return trampoline(target, arguments[0], arguments[1]); 9552 return trampoline(target, arguments[0], arguments[1]);
9553 case 3: 9553 case 3:
9554 return trampoline(target, arguments[0], arguments[1], arguments[2]); 9554 return trampoline(target, arguments[0], arguments[1], arguments[2]);
9555 case 4: 9555 case 4:
9556 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]); 9556 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]);
9557 default: 9557 default:
9558 throw new IllegalArgumentException("Not implemented for > 4 arguments"); 9558 throw new IllegalArgumentException("Not implemented for > 4 arguments");
9559 } 9559 }
9560 } 9560 }
9561 } 9561 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_core.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698