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

Side by Side Diff: pkg/compiler/lib/src/js/js.dart

Issue 2682813005: Add NoSourceLocationMarker in old source-info engine. (Closed)
Patch Set: Cleanup. 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 js; 5 library js;
6 6
7 import 'package:js_ast/js_ast.dart'; 7 import 'package:js_ast/js_ast.dart';
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../compiler.dart' show Compiler; 10 import '../compiler.dart' show Compiler;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 void error(String message) { 68 void error(String message) {
69 reporter.internalError(NO_LOCATION_SPANNABLE, message); 69 reporter.internalError(NO_LOCATION_SPANNABLE, message);
70 } 70 }
71 71
72 @override 72 @override
73 void emit(String string) { 73 void emit(String string) {
74 outBuffer.add(string); 74 outBuffer.add(string);
75 } 75 }
76 76
77 @override 77 @override
78 void enterNode(Node, int startPosition) {} 78 void enterNode(Node node, int startPosition) {
79 codePositionListener.onStartPosition(node, startPosition);
80 }
79 81
80 @override 82 @override
81 void exitNode( 83 void exitNode(
82 Node node, int startPosition, int endPosition, int closingPosition) { 84 Node node, int startPosition, int endPosition, int closingPosition) {
83 if (monitor != null) { 85 if (monitor != null) {
84 monitor.recordAstSize(node, endPosition - startPosition); 86 monitor.recordAstSize(node, endPosition - startPosition);
85 } 87 }
86 codePositionListener.onPositions( 88 codePositionListener.onPositions(
87 node, startPosition, endPosition, closingPosition); 89 node, startPosition, endPosition, closingPosition);
88 } 90 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 188 }
187 if (node is PropertyAccess) { 189 if (node is PropertyAccess) {
188 PropertyAccess access = node; 190 PropertyAccess access = node;
189 if (access.receiver is InterpolatedExpression) { 191 if (access.receiver is InterpolatedExpression) {
190 InterpolatedExpression hole = access.receiver; 192 InterpolatedExpression hole = access.receiver;
191 return hole.isPositional && hole.nameOrPosition == 0; 193 return hole.isPositional && hole.nameOrPosition == 0;
192 } 194 }
193 } 195 }
194 return false; 196 return false;
195 } 197 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698