| Index: pkg/analysis_server/lib/src/status/ast_writer.dart
|
| diff --git a/pkg/analysis_server/lib/src/status/ast_writer.dart b/pkg/analysis_server/lib/src/status/ast_writer.dart
|
| index 7303f6932a2c5e9cfc0c15eb841213605272ee96..424132e18d6bd2d1b492267da159174378d29cab 100644
|
| --- a/pkg/analysis_server/lib/src/status/ast_writer.dart
|
| +++ b/pkg/analysis_server/lib/src/status/ast_writer.dart
|
| @@ -9,6 +9,7 @@ import 'dart:collection';
|
| import 'package:analysis_server/src/status/tree_writer.dart';
|
| import 'package:analyzer/dart/ast/ast.dart';
|
| import 'package:analyzer/dart/ast/visitor.dart';
|
| +import 'package:analyzer/src/dart/ast/ast.dart';
|
|
|
| /**
|
| * A visitor that will produce an HTML representation of an AST structure.
|
| @@ -41,34 +42,75 @@ class AstWriter extends UnifyingAstVisitor with TreeWriter {
|
| Map<String, Object> properties = new HashMap<String, Object>();
|
|
|
| properties['name'] = _getName(node);
|
| - if (node is BinaryExpression) {
|
| + if (node is ArgumentListImpl) {
|
| + properties['static parameter types'] = node.correspondingStaticParameters;
|
| + properties['propagated parameter types'] =
|
| + node.correspondingPropagatedParameters;
|
| + } else if (node is Annotation) {
|
| + properties['element'] = node.element;
|
| + properties['element annotation'] = node.elementAnnotation;
|
| + } else if (node is BinaryExpression) {
|
| properties['static element'] = node.staticElement;
|
| properties['static type'] = node.staticType;
|
| properties['propagated element'] = node.propagatedElement;
|
| properties['propagated type'] = node.propagatedType;
|
| + } else if (node is ClassDeclaration) {
|
| + properties['element'] = node.element;
|
| + properties['abstract keyword'] = node.abstractKeyword;
|
| + } else if (node is ClassTypeAlias) {
|
| + properties['element'] = node.element;
|
| + properties['abstract keyword'] = node.abstractKeyword;
|
| } else if (node is CompilationUnit) {
|
| properties['element'] = node.element;
|
| + } else if (node is ConstructorName) {
|
| + properties['static element'] = node.staticElement;
|
| + } else if (node is DeclaredIdentifier) {
|
| + properties['element'] = node.element;
|
| + properties['keyword'] = node.keyword;
|
| } else if (node is ExportDirective) {
|
| properties['element'] = node.element;
|
| properties['source'] = node.source;
|
| + } else if (node is FieldDeclaration) {
|
| + properties['static keyword'] = node.staticKeyword;
|
| + } else if (node is FormalParameter) {
|
| + properties['element'] = node.element;
|
| + properties['kind'] = node.kind;
|
| } else if (node is FunctionDeclaration) {
|
| + properties['element'] = node.element;
|
| properties['external keyword'] = node.externalKeyword;
|
| properties['property keyword'] = node.propertyKeyword;
|
| } else if (node is FunctionExpressionInvocation) {
|
| properties['static element'] = node.staticElement;
|
| + properties['static invoke type'] = node.staticInvokeType;
|
| properties['static type'] = node.staticType;
|
| properties['propagated element'] = node.propagatedElement;
|
| + properties['propagated invoke type'] = node.propagatedInvokeType;
|
| properties['propagated type'] = node.propagatedType;
|
| } else if (node is ImportDirective) {
|
| properties['element'] = node.element;
|
| properties['source'] = node.source;
|
| + } else if (node is IndexExpression) {
|
| + properties['static element'] = node.staticElement;
|
| + properties['static type'] = node.staticType;
|
| + properties['propagated element'] = node.propagatedElement;
|
| + properties['propagated type'] = node.propagatedType;
|
| + } else if (node is InstanceCreationExpression) {
|
| + properties['static element'] = node.staticElement;
|
| + properties['static type'] = node.staticType;
|
| + properties['propagated type'] = node.propagatedType;
|
| } else if (node is LibraryDirective) {
|
| properties['element'] = node.element;
|
| } else if (node is MethodDeclaration) {
|
| + properties['element'] = node.element;
|
| properties['external keyword'] = node.externalKeyword;
|
| properties['modifier keyword'] = node.modifierKeyword;
|
| properties['operator keyword'] = node.operatorKeyword;
|
| properties['property keyword'] = node.propertyKeyword;
|
| + } else if (node is MethodInvocation) {
|
| + properties['static invoke type'] = node.staticInvokeType;
|
| + properties['static type'] = node.staticType;
|
| + properties['propagated invoke type'] = node.propagatedInvokeType;
|
| + properties['propagated type'] = node.propagatedType;
|
| } else if (node is PartDirective) {
|
| properties['element'] = node.element;
|
| properties['source'] = node.source;
|
| @@ -84,6 +126,8 @@ class AstWriter extends UnifyingAstVisitor with TreeWriter {
|
| properties['static type'] = node.staticType;
|
| properties['propagated element'] = node.propagatedElement;
|
| properties['propagated type'] = node.propagatedType;
|
| + } else if (node is RedirectingConstructorInvocation) {
|
| + properties['static element'] = node.staticElement;
|
| } else if (node is SimpleIdentifier) {
|
| properties['static element'] = node.staticElement;
|
| properties['static type'] = node.staticType;
|
| @@ -91,9 +135,25 @@ class AstWriter extends UnifyingAstVisitor with TreeWriter {
|
| properties['propagated type'] = node.propagatedType;
|
| } else if (node is SimpleStringLiteral) {
|
| properties['value'] = node.value;
|
| + } else if (node is SuperConstructorInvocation) {
|
| + properties['static element'] = node.staticElement;
|
| + } else if (node is TypeName) {
|
| + properties['type'] = node.type;
|
| + } else if (node is VariableDeclarationList) {
|
| + properties['keyword'] = node.keyword;
|
| + } else if (node is Declaration) {
|
| + properties['element'] = node.element;
|
| } else if (node is Expression) {
|
| properties['static type'] = node.staticType;
|
| properties['propagated type'] = node.propagatedType;
|
| + } else if (node is FunctionBody) {
|
| + properties['isAsynchronous'] = node.isAsynchronous;
|
| + properties['isGenerator'] = node.isGenerator;
|
| + } else if (node is Identifier) {
|
| + properties['static element'] = node.staticElement;
|
| + properties['static type'] = node.staticType;
|
| + properties['propagated element'] = node.propagatedElement;
|
| + properties['propagated type'] = node.propagatedType;
|
| }
|
|
|
| return properties;
|
| @@ -169,10 +229,11 @@ class AstWriter extends UnifyingAstVisitor with TreeWriter {
|
| buffer.write(node.offset);
|
| buffer.write('..');
|
| buffer.write(node.offset + node.length - 1);
|
| - buffer.write(']</span>');
|
| + buffer.write(']');
|
| if (node.isSynthetic) {
|
| buffer.write(' (synthetic)');
|
| }
|
| + buffer.write('</span>');
|
| buffer.write('<br>');
|
| }
|
| }
|
|
|