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

Side by Side Diff: lib/source_map_stack_trace.dart

Issue 1582503003: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/source_map_stack_trace.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 source_map_stack_trace;
6
7 import 'package:path/path.dart' as p; 5 import 'package:path/path.dart' as p;
8 import 'package:source_maps/source_maps.dart'; 6 import 'package:source_maps/source_maps.dart';
9 import 'package:stack_trace/stack_trace.dart'; 7 import 'package:stack_trace/stack_trace.dart';
10 8
11 /// Convert [stackTrace], a stack trace generated by dart2js-compiled 9 /// Convert [stackTrace], a stack trace generated by dart2js-compiled
12 /// JavaScript, to a native-looking stack trace using [sourceMap]. 10 /// JavaScript, to a native-looking stack trace using [sourceMap].
13 /// 11 ///
14 /// [minified] indicates whether or not the dart2js code was minified. If it 12 /// [minified] indicates whether or not the dart2js code was minified. If it
15 /// hasn't, this tries to clean up the stack frame member names. 13 /// hasn't, this tries to clean up the stack frame member names.
16 /// 14 ///
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 .replaceAll(new RegExp(r"[a-zA-Z_0-9]+\$"), "") 99 .replaceAll(new RegExp(r"[a-zA-Z_0-9]+\$"), "")
102 // Get rid of the static method prefix. The class name also exists in the 100 // Get rid of the static method prefix. The class name also exists in the
103 // invocation, so we're not getting rid of any information. 101 // invocation, so we're not getting rid of any information.
104 .replaceAll(new RegExp(r"^[a-zA-Z_0-9]+.(static|dart)."), "") 102 .replaceAll(new RegExp(r"^[a-zA-Z_0-9]+.(static|dart)."), "")
105 // Convert underscores after identifiers to dots. This runs the risk of 103 // Convert underscores after identifiers to dots. This runs the risk of
106 // incorrectly converting members that contain underscores, but those are 104 // incorrectly converting members that contain underscores, but those are
107 // contrary to the style guide anyway. 105 // contrary to the style guide anyway.
108 .replaceAllMapped(new RegExp(r"([a-zA-Z0-9]+)_"), 106 .replaceAllMapped(new RegExp(r"([a-zA-Z0-9]+)_"),
109 (match) => match[1] + "."); 107 (match) => match[1] + ".");
110 } 108 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698