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

Side by Side Diff: pkg/analysis_server/lib/src/computer/computer_highlights2.dart

Issue 1398293002: Move the wire protocol support into the public API (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add missed files Created 5 years, 2 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
OLDNEW
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/src/protocol.dart' hide Element; 7 import 'package:analysis_server/plugin/protocol/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';
11 11
12 /** 12 /**
13 * A computer for [HighlightRegion]s in a Dart [CompilationUnit]. 13 * A computer for [HighlightRegion]s in a Dart [CompilationUnit].
14 */ 14 */
15 class DartUnitHighlightsComputer2 { 15 class DartUnitHighlightsComputer2 {
16 final CompilationUnit _unit; 16 final CompilationUnit _unit;
17 17
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 void _addRegions_functionBody(FunctionBody node) { 809 void _addRegions_functionBody(FunctionBody node) {
810 Token keyword = node.keyword; 810 Token keyword = node.keyword;
811 if (keyword != null) { 811 if (keyword != null) {
812 Token star = node.star; 812 Token star = node.star;
813 int offset = keyword.offset; 813 int offset = keyword.offset;
814 int end = star != null ? star.end : keyword.end; 814 int end = star != null ? star.end : keyword.end;
815 computer._addRegion(offset, end - offset, HighlightRegionType.BUILT_IN); 815 computer._addRegion(offset, end - offset, HighlightRegionType.BUILT_IN);
816 } 816 }
817 } 817 }
818 } 818 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698