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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 2694403003: Add CompilationUnitElement.lineInfo and resynthesize it. (Closed)
Patch Set: Created 3 years, 10 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 analyzer.src.dart.element.element; 5 library analyzer.src.dart.element.element;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' show min; 8 import 'dart:math' show min;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 * The unlinked representation of the part in the summary. 1293 * The unlinked representation of the part in the summary.
1294 */ 1294 */
1295 final UnlinkedPart _unlinkedPart; 1295 final UnlinkedPart _unlinkedPart;
1296 1296
1297 /** 1297 /**
1298 * The source that corresponds to this compilation unit. 1298 * The source that corresponds to this compilation unit.
1299 */ 1299 */
1300 @override 1300 @override
1301 Source source; 1301 Source source;
1302 1302
1303 @override
1304 LineInfo lineInfo;
1305
1303 /** 1306 /**
1304 * The source of the library containing this compilation unit. 1307 * The source of the library containing this compilation unit.
1305 * 1308 *
1306 * This is the same as the source of the containing [LibraryElement], 1309 * This is the same as the source of the containing [LibraryElement],
1307 * except that it does not require the containing [LibraryElement] to be 1310 * except that it does not require the containing [LibraryElement] to be
1308 * computed. 1311 * computed.
1309 */ 1312 */
1310 Source librarySource; 1313 Source librarySource;
1311 1314
1312 /** 1315 /**
(...skipping 7330 matching lines...) Expand 10 before | Expand all | Expand 10 after
8643 8646
8644 @override 8647 @override
8645 void visitElement(Element element) { 8648 void visitElement(Element element) {
8646 int offset = element.nameOffset; 8649 int offset = element.nameOffset;
8647 if (offset != -1) { 8650 if (offset != -1) {
8648 map[offset] = element; 8651 map[offset] = element;
8649 } 8652 }
8650 super.visitElement(element); 8653 super.visitElement(element);
8651 } 8654 }
8652 } 8655 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/dart/element/element.dart ('k') | pkg/analyzer/lib/src/dart/element/handle.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698