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

Side by Side Diff: pkg/stack_trace/lib/src/frame.dart

Issue 14753005: Enable parsing of IPv6 form addresse (see rfc2373 and rfc2732). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tets. Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/stack_trace/test/frame_test.dart » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 frame; 5 library frame;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 8
9 import 'package:pathos/path.dart' as path; 9 import 'package:pathos/path.dart' as path;
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 /// Parses a string representation of a stack frame. 79 /// Parses a string representation of a stack frame.
80 /// 80 ///
81 /// [frame] should be formatted in the same way as a native stack trace frame. 81 /// [frame] should be formatted in the same way as a native stack trace frame.
82 factory Frame.parse(String frame) { 82 factory Frame.parse(String frame) {
83 var match = _nativeFrameRegExp.firstMatch(frame); 83 var match = _nativeFrameRegExp.firstMatch(frame);
84 if (match == null) { 84 if (match == null) {
85 throw new FormatException("Couldn't parse stack trace line '$frame'."); 85 throw new FormatException("Couldn't parse stack trace line '$frame'.");
86 } 86 }
87 87
88 var uri = new Uri.fromString(match[2]); 88 var uri = Uri.parse(match[2]);
89 var member = match[1].replaceAll("<anonymous closure>", "<fn>"); 89 var member = match[1].replaceAll("<anonymous closure>", "<fn>");
90 return new Frame(uri, int.parse(match[3]), int.parse(match[4]), member); 90 return new Frame(uri, int.parse(match[3]), int.parse(match[4]), member);
91 } 91 }
92 92
93 Frame(this.uri, this.line, this.column, this.member); 93 Frame(this.uri, this.line, this.column, this.member);
94 94
95 String toString() => '$location in $member'; 95 String toString() => '$location in $member';
96 } 96 }
OLDNEW
« no previous file with comments | « no previous file | pkg/stack_trace/test/frame_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698