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

Unified Diff: pkg/analyzer/tool/summary/mini_ast.dart

Issue 2872433005: more work aligning fasta.Token with analyzer.Token (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
Index: pkg/analyzer/tool/summary/mini_ast.dart
diff --git a/pkg/analyzer/tool/summary/mini_ast.dart b/pkg/analyzer/tool/summary/mini_ast.dart
index cc22b487faf32c31581f644f1341c10cf20b0060..4340da828be83192897a8b81fd323c481561a1d6 100644
--- a/pkg/analyzer/tool/summary/mini_ast.dart
+++ b/pkg/analyzer/tool/summary/mini_ast.dart
@@ -7,6 +7,7 @@ import 'package:front_end/src/fasta/parser/identifier_context.dart';
import 'package:front_end/src/fasta/parser/parser.dart';
import 'package:front_end/src/fasta/scanner/token.dart';
import 'package:front_end/src/fasta/source/stack_listener.dart';
+import 'package:front_end/src/scanner/token.dart' as analyzer;
/// "Mini AST" representation of a declaration which can accept annotations.
class AnnotatedNode {
@@ -54,7 +55,7 @@ class Comment {
final List<Token> tokens;
- factory Comment(Token commentToken) {
+ factory Comment(analyzer.Token commentToken) {
var tokens = <Token>[];
bool isDocumentation = false;
while (commentToken != null) {
@@ -163,7 +164,7 @@ class MiniAstBuilder extends StackListener {
void beginMetadataStar(Token token) {
debugEvent("beginMetadataStar");
if (token.precedingComments != null) {
- push(new Comment(token.precedingCommentTokens));
+ push(new Comment(token.precedingComments));
} else {
push(NullValue.Comments);
}
@@ -389,7 +390,7 @@ class MiniAstBuilder extends StackListener {
void handleIdentifier(Token token, IdentifierContext context) {
if (context == IdentifierContext.enumValueDeclaration) {
- var comment = new Comment(token.precedingCommentTokens);
+ var comment = new Comment(token.precedingComments);
push(new EnumConstantDeclaration(comment, null, token.lexeme));
} else {
push(token.lexeme);

Powered by Google App Engine
This is Rietveld 408576698