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

Side by Side Diff: test/generated_sdk/lib/internal/symbol.dart

Issue 959913003: cleanup patch generation to preseve comments and remove @patch (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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 | « test/generated_sdk/lib/internal/print.dart ('k') | test/generated_sdk/lib/math/math.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 part of dart._internal; 5 part of dart._internal;
6 6
7 /** 7 /**
8 * Implementation of [core.Symbol]. This class uses the same name as 8 * Implementation of [core.Symbol]. This class uses the same name as
9 * a core class so a user can't tell the difference. 9 * a core class so a user can't tell the difference.
10 * 10 *
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 * RegExp that validates a non-empty symbol. 91 * RegExp that validates a non-empty symbol.
92 * 92 *
93 * Private symbols are accepted. 93 * Private symbols are accepted.
94 * 94 *
95 * The empty symbol is handled before this regexp is used, and is not 95 * The empty symbol is handled before this regexp is used, and is not
96 * accepted. 96 * accepted.
97 */ 97 */
98 static final RegExp symbolPattern = new RegExp( 98 static final RegExp symbolPattern = new RegExp(
99 '^(?:$operatorRE\$|$identifierRE(?:=?\$|[.](?!\$)))+?\$'); 99 '^(?:$operatorRE\$|$identifierRE(?:=?\$|[.](?!\$)))+?\$');
100 100
101 @patch
102 const Symbol(String name) 101 const Symbol(String name)
103 : this._name = name; 102 : this._name = name;
104 103
105 /** 104 /**
106 * Platform-private method used by the mirror system to create 105 * Platform-private method used by the mirror system to create
107 * otherwise invalid names. 106 * otherwise invalid names.
108 */ 107 */
109 const Symbol.unvalidated(this._name); 108 const Symbol.unvalidated(this._name);
110 109
111 // This is called by dart2js. 110 // This is called by dart2js.
(...skipping 26 matching lines...) Expand all
138 137
139 /** 138 /**
140 * Checks whether name is a valid symbol name. 139 * Checks whether name is a valid symbol name.
141 * 140 *
142 * This test allows both private and non-private symbols. 141 * This test allows both private and non-private symbols.
143 */ 142 */
144 static bool isValidSymbol(String name) { 143 static bool isValidSymbol(String name) {
145 return (name.isEmpty || symbolPattern.hasMatch(name)); 144 return (name.isEmpty || symbolPattern.hasMatch(name));
146 } 145 }
147 } 146 }
OLDNEW
« no previous file with comments | « test/generated_sdk/lib/internal/print.dart ('k') | test/generated_sdk/lib/math/math.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698