| 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.highlights2; | 5 library computer.highlights2; |
| 6 | 6 |
| 7 import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element; | 7 import 'package:analysis_server/plugin/protocol/protocol.dart' hide Element; |
| 8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
| 9 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 9 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 } | 584 } |
| 585 | 585 |
| 586 @override | 586 @override |
| 587 Object visitFunctionTypeAlias(FunctionTypeAlias node) { | 587 Object visitFunctionTypeAlias(FunctionTypeAlias node) { |
| 588 computer._addRegion_token( | 588 computer._addRegion_token( |
| 589 node.typedefKeyword, HighlightRegionType.BUILT_IN); | 589 node.typedefKeyword, HighlightRegionType.BUILT_IN); |
| 590 return super.visitFunctionTypeAlias(node); | 590 return super.visitFunctionTypeAlias(node); |
| 591 } | 591 } |
| 592 | 592 |
| 593 @override | 593 @override |
| 594 Object visitGenericFunctionType(GenericFunctionType node) { | |
| 595 computer._addRegion_token( | |
| 596 node.functionKeyword, HighlightRegionType.KEYWORD); | |
| 597 return super.visitGenericFunctionType(node); | |
| 598 } | |
| 599 | |
| 600 @override | |
| 601 Object visitGenericTypeAlias(GenericTypeAlias node) { | |
| 602 computer._addRegion_token(node.typedefKeyword, HighlightRegionType.KEYWORD); | |
| 603 return super.visitGenericTypeAlias(node); | |
| 604 } | |
| 605 | |
| 606 @override | |
| 607 Object visitHideCombinator(HideCombinator node) { | 594 Object visitHideCombinator(HideCombinator node) { |
| 608 computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN); | 595 computer._addRegion_token(node.keyword, HighlightRegionType.BUILT_IN); |
| 609 return super.visitHideCombinator(node); | 596 return super.visitHideCombinator(node); |
| 610 } | 597 } |
| 611 | 598 |
| 612 @override | 599 @override |
| 613 Object visitIfStatement(IfStatement node) { | 600 Object visitIfStatement(IfStatement node) { |
| 614 computer._addRegion_token(node.ifKeyword, HighlightRegionType.KEYWORD); | 601 computer._addRegion_token(node.ifKeyword, HighlightRegionType.KEYWORD); |
| 615 return super.visitIfStatement(node); | 602 return super.visitIfStatement(node); |
| 616 } | 603 } |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 void _addRegions_functionBody(FunctionBody node) { | 814 void _addRegions_functionBody(FunctionBody node) { |
| 828 Token keyword = node.keyword; | 815 Token keyword = node.keyword; |
| 829 if (keyword != null) { | 816 if (keyword != null) { |
| 830 Token star = node.star; | 817 Token star = node.star; |
| 831 int offset = keyword.offset; | 818 int offset = keyword.offset; |
| 832 int end = star != null ? star.end : keyword.end; | 819 int end = star != null ? star.end : keyword.end; |
| 833 computer._addRegion(offset, end - offset, HighlightRegionType.BUILT_IN); | 820 computer._addRegion(offset, end - offset, HighlightRegionType.BUILT_IN); |
| 834 } | 821 } |
| 835 } | 822 } |
| 836 } | 823 } |
| OLD | NEW |