| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 computer.highlights; | 5 library computer.highlights; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/protocol.dart' hide Element; | 7 import 'package:analysis_server/src/protocol.dart' hide Element; |
| 8 import 'package:analyzer/src/generated/ast.dart'; | 8 import 'package:analyzer/src/generated/ast.dart'; |
| 9 import 'package:analyzer/src/generated/element.dart'; | 9 import 'package:analyzer/src/generated/element.dart'; |
| 10 import 'package:analyzer/src/generated/scanner.dart'; | 10 import 'package:analyzer/src/generated/scanner.dart'; |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 } | 469 } |
| 470 | 470 |
| 471 @override | 471 @override |
| 472 Object visitFieldDeclaration(FieldDeclaration node) { | 472 Object visitFieldDeclaration(FieldDeclaration node) { |
| 473 computer._addRegion_token(node.staticKeyword, HighlightRegionType.BUILT_IN); | 473 computer._addRegion_token(node.staticKeyword, HighlightRegionType.BUILT_IN); |
| 474 return super.visitFieldDeclaration(node); | 474 return super.visitFieldDeclaration(node); |
| 475 } | 475 } |
| 476 | 476 |
| 477 @override | 477 @override |
| 478 Object visitForEachStatement(ForEachStatement node) { | 478 Object visitForEachStatement(ForEachStatement node) { |
| 479 computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN); |
| 479 computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD); | 480 computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD); |
| 480 computer._addRegion_token(node.inKeyword, HighlightRegionType.KEYWORD); | 481 computer._addRegion_token(node.inKeyword, HighlightRegionType.KEYWORD); |
| 481 return super.visitForEachStatement(node); | 482 return super.visitForEachStatement(node); |
| 482 } | 483 } |
| 483 | 484 |
| 484 @override | 485 @override |
| 485 Object visitForStatement(ForStatement node) { | 486 Object visitForStatement(ForStatement node) { |
| 486 computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD); | 487 computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD); |
| 487 return super.visitForStatement(node); | 488 return super.visitForStatement(node); |
| 488 } | 489 } |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 void _addRegions_functionBody(FunctionBody node) { | 727 void _addRegions_functionBody(FunctionBody node) { |
| 727 Token keyword = node.keyword; | 728 Token keyword = node.keyword; |
| 728 if (keyword != null) { | 729 if (keyword != null) { |
| 729 Token star = node.star; | 730 Token star = node.star; |
| 730 int offset = keyword.offset; | 731 int offset = keyword.offset; |
| 731 int end = star != null ? star.end : keyword.end; | 732 int end = star != null ? star.end : keyword.end; |
| 732 computer._addRegion(offset, end - offset, HighlightRegionType.BUILT_IN); | 733 computer._addRegion(offset, end - offset, HighlightRegionType.BUILT_IN); |
| 733 } | 734 } |
| 734 } | 735 } |
| 735 } | 736 } |
| OLD | NEW |