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

Side by Side Diff: pkg/analyzer/lib/src/generated/html.dart

Issue 136223002: Generate names for anonymous Java classes using enclosing classes and members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 3
4 library engine.html; 4 library engine.html;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'java_core.dart'; 7 import 'java_core.dart';
8 import 'java_engine.dart'; 8 import 'java_engine.dart';
9 import 'source.dart'; 9 import 'source.dart';
10 import 'error.dart' show AnalysisErrorListener; 10 import 'error.dart' show AnalysisErrorListener;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 /** 235 /**
236 * Returns the [XmlAttributeNode] that is part of the given [HtmlUnit] and enc loses 236 * Returns the [XmlAttributeNode] that is part of the given [HtmlUnit] and enc loses
237 * the given offset. 237 * the given offset.
238 */ 238 */
239 static XmlAttributeNode getAttributeNode(HtmlUnit htmlUnit, int offset) { 239 static XmlAttributeNode getAttributeNode(HtmlUnit htmlUnit, int offset) {
240 if (htmlUnit == null) { 240 if (htmlUnit == null) {
241 return null; 241 return null;
242 } 242 }
243 List<XmlAttributeNode> result = [null]; 243 List<XmlAttributeNode> result = [null];
244 try { 244 try {
245 htmlUnit.accept(new RecursiveXmlVisitor_7(offset, result)); 245 htmlUnit.accept(new RecursiveXmlVisitor_HtmlUnitUtils_getAttributeNode(off set, result));
246 } on HtmlUnitUtils_FoundAttributeNodeError catch (e) { 246 } on HtmlUnitUtils_FoundAttributeNodeError catch (e) {
247 return result[0]; 247 return result[0];
248 } 248 }
249 return null; 249 return null;
250 } 250 }
251 251
252 /** 252 /**
253 * Returns the best [Element] of the given [Expression]. 253 * Returns the best [Element] of the given [Expression].
254 */ 254 */
255 static Element getElement(Expression expression) { 255 static Element getElement(Expression expression) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 /** 288 /**
289 * Returns the [Expression] that is part of the given [HtmlUnit] and encloses the 289 * Returns the [Expression] that is part of the given [HtmlUnit] and encloses the
290 * given offset. 290 * given offset.
291 */ 291 */
292 static Expression getExpression(HtmlUnit htmlUnit, int offset) { 292 static Expression getExpression(HtmlUnit htmlUnit, int offset) {
293 if (htmlUnit == null) { 293 if (htmlUnit == null) {
294 return null; 294 return null;
295 } 295 }
296 List<Expression> result = [null]; 296 List<Expression> result = [null];
297 try { 297 try {
298 htmlUnit.accept(new RecursiveXmlVisitor_8(offset, result)); 298 htmlUnit.accept(new RecursiveXmlVisitor_HtmlUnitUtils_getExpression(offset , result));
299 } on HtmlUnitUtils_FoundExpressionError catch (e) { 299 } on HtmlUnitUtils_FoundExpressionError catch (e) {
300 return result[0]; 300 return result[0];
301 } 301 }
302 return null; 302 return null;
303 } 303 }
304 304
305 /** 305 /**
306 * Returns the [XmlTagNode] that is part of the given [HtmlUnit] and encloses the 306 * Returns the [XmlTagNode] that is part of the given [HtmlUnit] and encloses the
307 * given offset. 307 * given offset.
308 */ 308 */
309 static XmlTagNode getTagNode(HtmlUnit htmlUnit, int offset) { 309 static XmlTagNode getTagNode(HtmlUnit htmlUnit, int offset) {
310 if (htmlUnit == null) { 310 if (htmlUnit == null) {
311 return null; 311 return null;
312 } 312 }
313 List<XmlTagNode> result = [null]; 313 List<XmlTagNode> result = [null];
314 try { 314 try {
315 htmlUnit.accept(new RecursiveXmlVisitor_9(offset, result)); 315 htmlUnit.accept(new RecursiveXmlVisitor_HtmlUnitUtils_getTagNode(offset, r esult));
316 } on HtmlUnitUtils_FoundTagNodeError catch (e) { 316 } on HtmlUnitUtils_FoundTagNodeError catch (e) {
317 return result[0]; 317 return result[0];
318 } 318 }
319 return null; 319 return null;
320 } 320 }
321 321
322 /** 322 /**
323 * Returns `true` if the given [HtmlUnit] has Angular annotation. 323 * Returns `true` if the given [HtmlUnit] has Angular annotation.
324 */ 324 */
325 static bool isAngular(HtmlUnit htmlUnit) => false; // AngularHtmlUnitResolver. hasAngularAnnotation(htmlUnit); 325 static bool isAngular(HtmlUnit htmlUnit) => false; // AngularHtmlUnitResolver. hasAngularAnnotation(htmlUnit);
(...skipping 15 matching lines...) Expand all
341 341
342 class HtmlUnitUtils_FoundAttributeNodeError extends Error { 342 class HtmlUnitUtils_FoundAttributeNodeError extends Error {
343 } 343 }
344 344
345 class HtmlUnitUtils_FoundExpressionError extends Error { 345 class HtmlUnitUtils_FoundExpressionError extends Error {
346 } 346 }
347 347
348 class HtmlUnitUtils_FoundTagNodeError extends Error { 348 class HtmlUnitUtils_FoundTagNodeError extends Error {
349 } 349 }
350 350
351 class RecursiveXmlVisitor_7 extends RecursiveXmlVisitor<Object> { 351 class RecursiveXmlVisitor_HtmlUnitUtils_getAttributeNode extends RecursiveXmlVis itor<Object> {
352 int offset = 0; 352 int offset = 0;
353 353
354 List<XmlAttributeNode> result; 354 List<XmlAttributeNode> result;
355 355
356 RecursiveXmlVisitor_7(this.offset, this.result) : super(); 356 RecursiveXmlVisitor_HtmlUnitUtils_getAttributeNode(this.offset, this.result) : super();
357 357
358 Object visitXmlAttributeNode(XmlAttributeNode node) { 358 Object visitXmlAttributeNode(XmlAttributeNode node) {
359 Token nameToken = node.nameToken; 359 Token nameToken = node.nameToken;
360 if (nameToken.offset <= offset && offset < nameToken.end) { 360 if (nameToken.offset <= offset && offset < nameToken.end) {
361 result[0] = node; 361 result[0] = node;
362 throw new HtmlUnitUtils_FoundAttributeNodeError(); 362 throw new HtmlUnitUtils_FoundAttributeNodeError();
363 } 363 }
364 return super.visitXmlAttributeNode(node); 364 return super.visitXmlAttributeNode(node);
365 } 365 }
366 } 366 }
367 367
368 class RecursiveXmlVisitor_8 extends RecursiveXmlVisitor<Object> { 368 class RecursiveXmlVisitor_HtmlUnitUtils_getExpression extends RecursiveXmlVisito r<Object> {
369 int offset = 0; 369 int offset = 0;
370 370
371 List<Expression> result; 371 List<Expression> result;
372 372
373 RecursiveXmlVisitor_8(this.offset, this.result) : super(); 373 RecursiveXmlVisitor_HtmlUnitUtils_getExpression(this.offset, this.result) : su per();
374 374
375 Object visitXmlAttributeNode(XmlAttributeNode node) { 375 Object visitXmlAttributeNode(XmlAttributeNode node) {
376 findExpression(offset, result, node.expressions); 376 findExpression(offset, result, node.expressions);
377 return super.visitXmlAttributeNode(node); 377 return super.visitXmlAttributeNode(node);
378 } 378 }
379 379
380 Object visitXmlTagNode(XmlTagNode node) { 380 Object visitXmlTagNode(XmlTagNode node) {
381 findExpression(offset, result, node.expressions); 381 findExpression(offset, result, node.expressions);
382 return super.visitXmlTagNode(node); 382 return super.visitXmlTagNode(node);
383 } 383 }
384 384
385 void findExpression(int offset, List<Expression> result, List<EmbeddedExpressi on> expressions) { 385 void findExpression(int offset, List<Expression> result, List<EmbeddedExpressi on> expressions) {
386 for (EmbeddedExpression embeddedExpression in expressions) { 386 for (EmbeddedExpression embeddedExpression in expressions) {
387 Expression expression = embeddedExpression.expression; 387 Expression expression = embeddedExpression.expression;
388 Expression at = HtmlUnitUtils.getExpressionAt(expression, offset); 388 Expression at = HtmlUnitUtils.getExpressionAt(expression, offset);
389 if (at != null) { 389 if (at != null) {
390 result[0] = at; 390 result[0] = at;
391 throw new HtmlUnitUtils_FoundExpressionError(); 391 throw new HtmlUnitUtils_FoundExpressionError();
392 } 392 }
393 } 393 }
394 } 394 }
395 } 395 }
396 396
397 class RecursiveXmlVisitor_9 extends RecursiveXmlVisitor<Object> { 397 class RecursiveXmlVisitor_HtmlUnitUtils_getTagNode extends RecursiveXmlVisitor<O bject> {
398 int offset = 0; 398 int offset = 0;
399 399
400 List<XmlTagNode> result; 400 List<XmlTagNode> result;
401 401
402 RecursiveXmlVisitor_9(this.offset, this.result) : super(); 402 RecursiveXmlVisitor_HtmlUnitUtils_getTagNode(this.offset, this.result) : super ();
403 403
404 Object visitXmlTagNode(XmlTagNode node) { 404 Object visitXmlTagNode(XmlTagNode node) {
405 super.visitXmlTagNode(node); 405 super.visitXmlTagNode(node);
406 Token tagToken = node.tagToken; 406 Token tagToken = node.tagToken;
407 if (tagToken.offset <= offset && offset < tagToken.end) { 407 if (tagToken.offset <= offset && offset < tagToken.end) {
408 result[0] = node; 408 result[0] = node;
409 throw new HtmlUnitUtils_FoundTagNodeError(); 409 throw new HtmlUnitUtils_FoundTagNodeError();
410 } 410 }
411 return null; 411 return null;
412 } 412 }
(...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2180 } 2180 }
2181 super.element = element; 2181 super.element = element;
2182 } 2182 }
2183 2183
2184 void visitChildren(XmlVisitor visitor) { 2184 void visitChildren(XmlVisitor visitor) {
2185 for (XmlTagNode node in _tagNodes) { 2185 for (XmlTagNode node in _tagNodes) {
2186 node.accept(visitor); 2186 node.accept(visitor);
2187 } 2187 }
2188 } 2188 }
2189 } 2189 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/error.dart ('k') | pkg/analyzer/lib/src/generated/instrumentation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698