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

Side by Side Diff: compiler/lib/implementation/regexp.dart

Issue 8966029: Report errors and warnings for hiding elements, issue 572. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for comments Created 9 years 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 class JSSyntaxRegExp implements RegExp { 5 class JSSyntaxRegExp implements RegExp {
6 const JSSyntaxRegExp( 6 const JSSyntaxRegExp(
7 String this.pattern, 7 String this.pattern,
8 [bool this.multiLine = false, 8 [bool this.multiLine = false,
9 bool this.ignoreCase = false]); 9 bool this.ignoreCase = false]);
10 10
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 } 32 }
33 33
34 class JSSyntaxMatch implements Match { 34 class JSSyntaxMatch implements Match {
35 const JSSyntaxMatch(RegExp regexp, String str) 35 const JSSyntaxMatch(RegExp regexp, String str)
36 : this.pattern = regexp, this.str = str; 36 : this.pattern = regexp, this.str = str;
37 37
38 final String str; 38 final String str;
39 final Pattern pattern; 39 final Pattern pattern;
40 40
41 String operator[](int group) { 41 String operator[](int group_) {
42 return this.group(group); 42 return this.group(group_);
43 } 43 }
44 44
45 List<String> groups(List<int> groups) { 45 List<String> groups(List<int> groups_) {
46 List<String> strings = new List<String>(); 46 List<String> strings = new List<String>();
47 groups.forEach((int group) { 47 groups_.forEach((int group_) {
48 strings.add(this.group(group)); 48 strings.add(this.group(group_));
49 }); 49 });
50 return strings; 50 return strings;
51 } 51 }
52 52
53 String group(int nb) native; 53 String group(int nb) native;
54 54
55 int start() native; 55 int start() native;
56 56
57 int end() native; 57 int end() native;
58 58
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 bool hasNext() { 133 bool hasNext() {
134 if (_nextMatch != null) return true; 134 if (_nextMatch != null) return true;
135 _nextMatch = _computeNextMatch(_regexp, _str); 135 _nextMatch = _computeNextMatch(_regexp, _str);
136 return (_nextMatch != null); 136 return (_nextMatch != null);
137 } 137 }
138 138
139 void _jsInit(JSSyntaxRegExp regexp) native; 139 void _jsInit(JSSyntaxRegExp regexp) native;
140 Match _computeNextMatch(JSSyntaxRegExp regexp, String str) native; 140 Match _computeNextMatch(JSSyntaxRegExp regexp, String str) native;
141 } 141 }
OLDNEW
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java ('k') | compiler/lib/implementation/string.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698