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

Unified Diff: pkg/analysis_server/lib/src/computer/computer_highlights.dart

Issue 559353003: Semantic highlighting for LABEL elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/computer/computer_highlights.dart
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights.dart b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
index c01c4ac0bf2598ba234e4e1b8f50b9e51dce6f5b..83480b1b43e59b94883dbd124d97c17ef0533202 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
@@ -82,6 +82,9 @@ class DartUnitHighlightsComputer {
if (_addIdentifierRegion_importPrefix(node)) {
return;
}
+ if (_addIdentifierRegion_label(node)) {
+ return;
+ }
if (_addIdentifierRegion_localVariable(node)) {
return;
}
@@ -225,6 +228,14 @@ class DartUnitHighlightsComputer {
return false;
}
+ bool _addIdentifierRegion_label(SimpleIdentifier node) {
+ Element element = node.staticElement;
+ if (element is! LabelElement) {
+ return false;
+ }
+ return _addRegion_node(node, HighlightRegionType.LABEL);
+ }
+
bool _addIdentifierRegion_localVariable(SimpleIdentifier node) {
Element element = node.staticElement;
if (element is! LocalVariableElement) {

Powered by Google App Engine
This is Rietveld 408576698