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/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 properties['propagated element'] = node.propagatedElement; | 55 properties['propagated element'] = node.propagatedElement; |
56 properties['propagated type'] = node.propagatedType; | 56 properties['propagated type'] = node.propagatedType; |
57 } else if (node is ClassDeclaration) { | 57 } else if (node is ClassDeclaration) { |
58 properties['element'] = node.element; | 58 properties['element'] = node.element; |
59 properties['abstract keyword'] = node.abstractKeyword; | 59 properties['abstract keyword'] = node.abstractKeyword; |
60 } else if (node is ClassTypeAlias) { | 60 } else if (node is ClassTypeAlias) { |
61 properties['element'] = node.element; | 61 properties['element'] = node.element; |
62 properties['abstract keyword'] = node.abstractKeyword; | 62 properties['abstract keyword'] = node.abstractKeyword; |
63 } else if (node is CompilationUnit) { | 63 } else if (node is CompilationUnit) { |
64 properties['element'] = node.element; | 64 properties['element'] = node.element; |
| 65 } else if (node is Configuration) { |
| 66 properties['uriSource'] = node.uriSource; |
65 } else if (node is ConstructorName) { | 67 } else if (node is ConstructorName) { |
66 properties['static element'] = node.staticElement; | 68 properties['static element'] = node.staticElement; |
67 } else if (node is DeclaredIdentifier) { | 69 } else if (node is DeclaredIdentifier) { |
68 properties['element'] = node.element; | 70 properties['element'] = node.element; |
69 properties['keyword'] = node.keyword; | 71 properties['keyword'] = node.keyword; |
70 } else if (node is ExportDirective) { | 72 } else if (node is ExportDirective) { |
71 properties['element'] = node.element; | 73 properties['element'] = node.element; |
72 properties['source'] = node.source; | 74 properties['selectedSource'] = node.selectedSource; |
| 75 properties['uriSource'] = node.uriSource; |
73 } else if (node is FieldDeclaration) { | 76 } else if (node is FieldDeclaration) { |
74 properties['static keyword'] = node.staticKeyword; | 77 properties['static keyword'] = node.staticKeyword; |
75 } else if (node is FormalParameter) { | 78 } else if (node is FormalParameter) { |
76 properties['element'] = node.element; | 79 properties['element'] = node.element; |
77 properties['kind'] = node.kind; | 80 properties['kind'] = node.kind; |
78 } else if (node is FunctionDeclaration) { | 81 } else if (node is FunctionDeclaration) { |
79 properties['element'] = node.element; | 82 properties['element'] = node.element; |
80 properties['external keyword'] = node.externalKeyword; | 83 properties['external keyword'] = node.externalKeyword; |
81 properties['property keyword'] = node.propertyKeyword; | 84 properties['property keyword'] = node.propertyKeyword; |
82 } else if (node is FunctionExpressionInvocation) { | 85 } else if (node is FunctionExpressionInvocation) { |
83 properties['static element'] = node.staticElement; | 86 properties['static element'] = node.staticElement; |
84 properties['static invoke type'] = node.staticInvokeType; | 87 properties['static invoke type'] = node.staticInvokeType; |
85 properties['static type'] = node.staticType; | 88 properties['static type'] = node.staticType; |
86 properties['propagated element'] = node.propagatedElement; | 89 properties['propagated element'] = node.propagatedElement; |
87 properties['propagated invoke type'] = node.propagatedInvokeType; | 90 properties['propagated invoke type'] = node.propagatedInvokeType; |
88 properties['propagated type'] = node.propagatedType; | 91 properties['propagated type'] = node.propagatedType; |
89 } else if (node is ImportDirective) { | 92 } else if (node is ImportDirective) { |
90 properties['element'] = node.element; | 93 properties['element'] = node.element; |
91 properties['source'] = node.source; | 94 properties['selectedSource'] = node.selectedSource; |
| 95 properties['uriSource'] = node.uriSource; |
92 } else if (node is IndexExpression) { | 96 } else if (node is IndexExpression) { |
93 properties['static element'] = node.staticElement; | 97 properties['static element'] = node.staticElement; |
94 properties['static type'] = node.staticType; | 98 properties['static type'] = node.staticType; |
95 properties['propagated element'] = node.propagatedElement; | 99 properties['propagated element'] = node.propagatedElement; |
96 properties['propagated type'] = node.propagatedType; | 100 properties['propagated type'] = node.propagatedType; |
97 } else if (node is InstanceCreationExpression) { | 101 } else if (node is InstanceCreationExpression) { |
98 properties['static element'] = node.staticElement; | 102 properties['static element'] = node.staticElement; |
99 properties['static type'] = node.staticType; | 103 properties['static type'] = node.staticType; |
100 properties['propagated type'] = node.propagatedType; | 104 properties['propagated type'] = node.propagatedType; |
101 } else if (node is LibraryDirective) { | 105 } else if (node is LibraryDirective) { |
102 properties['element'] = node.element; | 106 properties['element'] = node.element; |
103 } else if (node is MethodDeclaration) { | 107 } else if (node is MethodDeclaration) { |
104 properties['element'] = node.element; | 108 properties['element'] = node.element; |
105 properties['external keyword'] = node.externalKeyword; | 109 properties['external keyword'] = node.externalKeyword; |
106 properties['modifier keyword'] = node.modifierKeyword; | 110 properties['modifier keyword'] = node.modifierKeyword; |
107 properties['operator keyword'] = node.operatorKeyword; | 111 properties['operator keyword'] = node.operatorKeyword; |
108 properties['property keyword'] = node.propertyKeyword; | 112 properties['property keyword'] = node.propertyKeyword; |
109 } else if (node is MethodInvocation) { | 113 } else if (node is MethodInvocation) { |
110 properties['static invoke type'] = node.staticInvokeType; | 114 properties['static invoke type'] = node.staticInvokeType; |
111 properties['static type'] = node.staticType; | 115 properties['static type'] = node.staticType; |
112 properties['propagated invoke type'] = node.propagatedInvokeType; | 116 properties['propagated invoke type'] = node.propagatedInvokeType; |
113 properties['propagated type'] = node.propagatedType; | 117 properties['propagated type'] = node.propagatedType; |
114 } else if (node is PartDirective) { | 118 } else if (node is PartDirective) { |
115 properties['element'] = node.element; | 119 properties['element'] = node.element; |
116 properties['source'] = node.source; | 120 properties['uriSource'] = node.uriSource; |
117 } else if (node is PartOfDirective) { | 121 } else if (node is PartOfDirective) { |
118 properties['element'] = node.element; | 122 properties['element'] = node.element; |
119 } else if (node is PostfixExpression) { | 123 } else if (node is PostfixExpression) { |
120 properties['static element'] = node.staticElement; | 124 properties['static element'] = node.staticElement; |
121 properties['static type'] = node.staticType; | 125 properties['static type'] = node.staticType; |
122 properties['propagated element'] = node.propagatedElement; | 126 properties['propagated element'] = node.propagatedElement; |
123 properties['propagated type'] = node.propagatedType; | 127 properties['propagated type'] = node.propagatedType; |
124 } else if (node is PrefixExpression) { | 128 } else if (node is PrefixExpression) { |
125 properties['static element'] = node.staticElement; | 129 properties['static element'] = node.staticElement; |
126 properties['static type'] = node.staticType; | 130 properties['static type'] = node.staticType; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 buffer.write('..'); | 234 buffer.write('..'); |
231 buffer.write(node.offset + node.length - 1); | 235 buffer.write(node.offset + node.length - 1); |
232 buffer.write(']'); | 236 buffer.write(']'); |
233 if (node.isSynthetic) { | 237 if (node.isSynthetic) { |
234 buffer.write(' (synthetic)'); | 238 buffer.write(' (synthetic)'); |
235 } | 239 } |
236 buffer.write('</span>'); | 240 buffer.write('</span>'); |
237 buffer.write('<br>'); | 241 buffer.write('<br>'); |
238 } | 242 } |
239 } | 243 } |
OLD | NEW |