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

Unified Diff: pkg/analyzer/lib/src/fasta/token_utils.dart

Issue 2872453004: cleanup TokenType var names (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/fasta/ast_builder.dart ('k') | pkg/compiler/lib/src/resolution/enum_creator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/fasta/token_utils.dart
diff --git a/pkg/analyzer/lib/src/fasta/token_utils.dart b/pkg/analyzer/lib/src/fasta/token_utils.dart
index ed035bc5905e339b3f0f321de1a844dbeaa8e591..0f757c882d98b1fe4237f8b7d7ed3a483d6fb301 100644
--- a/pkg/analyzer/lib/src/fasta/token_utils.dart
+++ b/pkg/analyzer/lib/src/fasta/token_utils.dart
@@ -88,7 +88,7 @@ class ToAnalyzerTokenStreamConverter {
_endTokenStack = <Token>[null];
while (true) {
- if (token.info.kind == BAD_INPUT_TOKEN) {
+ if (token.type.kind == BAD_INPUT_TOKEN) {
ErrorToken errorToken = token;
translateErrorToken(errorToken, reportError);
} else {
@@ -208,13 +208,13 @@ Token fromAnalyzerTokenStream(analyzer.Token analyzerToken) {
beginTokenStack.last.endGroup = translatedToken;
beginTokenStack.removeLast();
endTokenStack.removeLast();
- } else if (translatedToken.info.kind == LT_TOKEN) {
+ } else if (translatedToken.type.kind == LT_TOKEN) {
BeginGroupToken beginGroupToken = translatedToken;
angleBracketStack.add(beginGroupToken);
- } else if (translatedToken.info.kind == GT_TOKEN &&
+ } else if (translatedToken.type.kind == GT_TOKEN &&
angleBracketStack.isNotEmpty) {
angleBracketStack.removeLast().endGroup = translatedToken;
- } else if (translatedToken.info.kind == GT_GT_TOKEN &&
+ } else if (translatedToken.type.kind == GT_GT_TOKEN &&
angleBracketStack.isNotEmpty) {
angleBracketStack.removeLast();
if (angleBracketStack.isNotEmpty) {
@@ -275,10 +275,10 @@ Token fromAnalyzerTokenStream(analyzer.Token analyzerToken) {
/// Converts a single analyzer token into a Fasta token.
Token fromAnalyzerToken(analyzer.Token token) {
- Token beginGroup(TokenType info) => new BeginGroupToken(info, token.offset);
- Token string(TokenType info) =>
- new StringToken.fromString(info, token.lexeme, token.offset);
- Token symbol(TokenType info) => new SymbolToken(info, token.offset);
+ Token beginGroup(TokenType type) => new BeginGroupToken(type, token.offset);
+ Token string(TokenType type) =>
+ new StringToken.fromString(type, token.lexeme, token.offset);
+ Token symbol(TokenType type) => new SymbolToken(type, token.offset);
if (token.type.isKeyword) {
var keyword = Keyword.keywords[token.lexeme];
if (keyword != null) {
« no previous file with comments | « pkg/analyzer/lib/src/fasta/ast_builder.dart ('k') | pkg/compiler/lib/src/resolution/enum_creator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698