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

Side by Side Diff: pkg/analysis_server/lib/src/status/ast_writer.dart

Issue 1788223002: Deprecate the generated AST library and clean up imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library analysis_server.src.status.ast_writer; 5 library analysis_server.src.status.ast_writer;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/src/status/tree_writer.dart'; 9 import 'package:analysis_server/src/status/tree_writer.dart';
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
11 import 'package:analyzer/dart/ast/visitor.dart';
11 12
12 /** 13 /**
13 * A visitor that will produce an HTML representation of an AST structure. 14 * A visitor that will produce an HTML representation of an AST structure.
14 */ 15 */
15 class AstWriter extends UnifyingAstVisitor with TreeWriter { 16 class AstWriter extends UnifyingAstVisitor with TreeWriter {
16 /** 17 /**
17 * Initialize a newly created element writer to write the HTML representation 18 * Initialize a newly created element writer to write the HTML representation
18 * of visited nodes on the given [buffer]. 19 * of visited nodes on the given [buffer].
19 */ 20 */
20 AstWriter(StringBuffer buffer) { 21 AstWriter(StringBuffer buffer) {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 buffer.write(node.offset); 169 buffer.write(node.offset);
169 buffer.write('..'); 170 buffer.write('..');
170 buffer.write(node.offset + node.length - 1); 171 buffer.write(node.offset + node.length - 1);
171 buffer.write(']</span>'); 172 buffer.write(']</span>');
172 if (node.isSynthetic) { 173 if (node.isSynthetic) {
173 buffer.write(' (synthetic)'); 174 buffer.write(' (synthetic)');
174 } 175 }
175 buffer.write('<br>'); 176 buffer.write('<br>');
176 } 177 }
177 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698