OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 _JSRegExpMatch implements Match { | 5 class _JSRegExpMatch implements Match { |
6 _JSRegExpMatch(this.regexp, this.str, this._match); | 6 _JSRegExpMatch(this.regexp, this.str, this._match); |
7 | 7 |
8 int start() { | 8 int start() { |
9 return _start(0); | 9 return _start(0); |
10 } | 10 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 for (int i = 0; i < groupsSpec.length; i++) { | 43 for (int i = 0; i < groupsSpec.length; i++) { |
44 groupsList[i] = group(groupsSpec[i]); | 44 groupsList[i] = group(groupsSpec[i]); |
45 } | 45 } |
46 return groupsList; | 46 return groupsList; |
47 } | 47 } |
48 | 48 |
49 int groupCount() { | 49 int groupCount() { |
50 return regexp._groupCount; | 50 return regexp._groupCount; |
51 } | 51 } |
52 | 52 |
53 String get pattern() => regexp.pattern; | 53 String get pattern => regexp.pattern; |
54 | 54 |
55 final RegExp regexp; | 55 final RegExp regexp; |
56 final String str; | 56 final String str; |
57 final List<int> _match; | 57 final List<int> _match; |
58 static const int MATCH_PAIR = 2; | 58 static const int MATCH_PAIR = 2; |
59 } | 59 } |
60 | 60 |
61 | 61 |
62 patch class JSSyntaxRegExp { | 62 patch class JSSyntaxRegExp { |
63 /* patch */ const factory JSSyntaxRegExp( | 63 /* patch */ const factory JSSyntaxRegExp( |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 /* patch */ bool get multiLine() native "JSSyntaxRegExp_multiLine"; | 113 /* patch */ bool get multiLine() native "JSSyntaxRegExp_multiLine"; |
114 | 114 |
115 /* patch */ bool get ignoreCase() native "JSSyntaxRegExp_ignoreCase"; | 115 /* patch */ bool get ignoreCase() native "JSSyntaxRegExp_ignoreCase"; |
116 | 116 |
117 int get _groupCount() native "JSSyntaxRegExp_getGroupCount"; | 117 int get _groupCount() native "JSSyntaxRegExp_getGroupCount"; |
118 | 118 |
119 List _ExecuteMatch(String str, int start_index) | 119 List _ExecuteMatch(String str, int start_index) |
120 native "JSSyntaxRegExp_ExecuteMatch"; | 120 native "JSSyntaxRegExp_ExecuteMatch"; |
121 } | 121 } |
OLD | NEW |