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

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

Issue 1788223002: Deprecate the generated AST library and clean up imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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.highlights; 5 library computer.highlights;
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/token.dart'; 9 import 'package:analyzer/dart/ast/token.dart';
10 import 'package:analyzer/dart/ast/visitor.dart';
9 import 'package:analyzer/dart/element/element.dart'; 11 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/type.dart'; 12 import 'package:analyzer/dart/element/type.dart';
11 import 'package:analyzer/src/generated/ast.dart';
12 13
13 /** 14 /**
14 * A computer for [HighlightRegion]s in a Dart [CompilationUnit]. 15 * A computer for [HighlightRegion]s in a Dart [CompilationUnit].
15 */ 16 */
16 class DartUnitHighlightsComputer { 17 class DartUnitHighlightsComputer {
17 final CompilationUnit _unit; 18 final CompilationUnit _unit;
18 19
19 final List<HighlightRegion> _regions = <HighlightRegion>[]; 20 final List<HighlightRegion> _regions = <HighlightRegion>[];
20 21
21 DartUnitHighlightsComputer(this._unit); 22 DartUnitHighlightsComputer(this._unit);
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 void _addRegions_functionBody(FunctionBody node) { 717 void _addRegions_functionBody(FunctionBody node) {
717 Token keyword = node.keyword; 718 Token keyword = node.keyword;
718 if (keyword != null) { 719 if (keyword != null) {
719 Token star = node.star; 720 Token star = node.star;
720 int offset = keyword.offset; 721 int offset = keyword.offset;
721 int end = star != null ? star.end : keyword.end; 722 int end = star != null ? star.end : keyword.end;
722 computer._addRegion(offset, end - offset, HighlightRegionType.BUILT_IN); 723 computer._addRegion(offset, end - offset, HighlightRegionType.BUILT_IN);
723 } 724 }
724 } 725 }
725 } 726 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | pkg/analysis_server/lib/src/computer/computer_highlights2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698