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

Unified Diff: pkg/analyzer/lib/src/fasta/ast_builder.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/dart/scanner/scanner.dart ('k') | pkg/analyzer/lib/src/fasta/token_utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/fasta/ast_builder.dart
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 70a7539d3cd64b939cd03f22ad0543f247a48767..8f4fd139d1cc4ac54f3fa8034a90689a4e59f5dc 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -1943,15 +1943,15 @@ class AstBuilder extends ScopeListener {
pop();
}
- /// Check if the given [token] has a comment token with the given [info],
+ /// Check if the given [token] has a comment token with the given [type],
/// which should be either [TokenType.GENERIC_METHOD_TYPE_ASSIGN] or
/// [TokenType.GENERIC_METHOD_TYPE_LIST]. If found, parse the comment
/// into tokens and inject into the token stream before the [token].
- Token _injectGenericComment(Token token, TokenType info, int prefixLen) {
+ Token _injectGenericComment(Token token, TokenType type, int prefixLen) {
if (parseGenericMethodComments) {
CommentToken t = token.precedingCommentTokens;
for (; t != null; t = t.next) {
- if (t.info == info) {
+ if (t.type == type) {
String code = t.lexeme.substring(prefixLen, t.lexeme.length - 2);
Token tokens = _scanGenericMethodComment(code, t.offset + prefixLen);
if (tokens != null) {
@@ -1970,7 +1970,7 @@ class AstBuilder extends ScopeListener {
void _injectTokenList(Token beforeToken, Token firstToken) {
// Scanner creates a cyclic EOF token.
Token lastToken = firstToken;
- while (lastToken.next.info != TokenType.EOF) {
+ while (lastToken.next.type != TokenType.EOF) {
lastToken = lastToken.next;
}
// Inject these new tokens into the stream.
« no previous file with comments | « pkg/analyzer/lib/src/dart/scanner/scanner.dart ('k') | pkg/analyzer/lib/src/fasta/token_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698