| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |