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

Side by Side Diff: pkg/path/lib/src/context.dart

Issue 434393002: Fix internal constructor in context. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | 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) 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 path.context; 5 library path.context;
6 6
7 import 'internal_style.dart'; 7 import 'internal_style.dart';
8 import 'style.dart'; 8 import 'style.dart';
9 import 'parsed_path.dart'; 9 import 'parsed_path.dart';
10 import 'path_exception.dart'; 10 import 'path_exception.dart';
(...skipping 26 matching lines...) Expand all
37 style = Style.platform; 37 style = Style.platform;
38 } else if (style is! InternalStyle) { 38 } else if (style is! InternalStyle) {
39 throw new ArgumentError("Only styles defined by the path package are " 39 throw new ArgumentError("Only styles defined by the path package are "
40 "allowed."); 40 "allowed.");
41 } 41 }
42 42
43 return new Context._(style, current); 43 return new Context._(style, current);
44 } 44 }
45 45
46 /// Create a [Context] to be used internally within path. 46 /// Create a [Context] to be used internally within path.
47 Context._internal() : style = Style.platform; 47 Context._internal() : style = Style.platform, _current = null;
48 48
49 Context._(this.style, this._current); 49 Context._(this.style, this._current);
50 50
51 /// The style of path that this context works with. 51 /// The style of path that this context works with.
52 final InternalStyle style; 52 final InternalStyle style;
53 53
54 /// The current directory given when Context was created. If null, current 54 /// The current directory given when Context was created. If null, current
55 /// directory is evaluated from 'p.current'. 55 /// directory is evaluated from 'p.current'.
56 final String _current; 56 final String _current;
57 57
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 // Show the arguments. 547 // Show the arguments.
548 var message = new StringBuffer(); 548 var message = new StringBuffer();
549 message.write("$method("); 549 message.write("$method(");
550 message.write(args.take(numArgs) 550 message.write(args.take(numArgs)
551 .map((arg) => arg == null ? "null" : '"$arg"') 551 .map((arg) => arg == null ? "null" : '"$arg"')
552 .join(", ")); 552 .join(", "));
553 message.write("): part ${i - 1} was null, but part $i was not."); 553 message.write("): part ${i - 1} was null, but part $i was not.");
554 throw new ArgumentError(message.toString()); 554 throw new ArgumentError(message.toString());
555 } 555 }
556 } 556 }
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