| OLD | NEW |
| 1 dart_library.library('dart/_js_helper', null, /* Imports */[ | 1 dart_library.library('dart/_js_helper', null, /* Imports */[ |
| 2 "dart_runtime/dart", | 2 "dart_runtime/dart", |
| 3 'dart/core', | 3 'dart/core', |
| 4 'dart/collection', | 4 'dart/collection', |
| 5 'dart/_interceptors', | 5 'dart/_interceptors', |
| 6 'dart/_foreign_helper' | 6 'dart/_foreign_helper' |
| 7 ], /* Lazy imports */[ | 7 ], /* Lazy imports */[ |
| 8 ], function(exports, dart, core, collection, _interceptors, _foreign_helper) { | 8 ], function(exports, dart, core, collection, _interceptors, _foreign_helper) { |
| 9 'use strict'; | 9 'use strict'; |
| 10 let dartx = dart.dartx; | 10 let dartx = dart.dartx; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 return this[_nativeRegExp].multiline; | 110 return this[_nativeRegExp].multiline; |
| 111 } | 111 } |
| 112 get [_isCaseSensitive]() { | 112 get [_isCaseSensitive]() { |
| 113 return !this[_nativeRegExp].ignoreCase; | 113 return !this[_nativeRegExp].ignoreCase; |
| 114 } | 114 } |
| 115 static makeNative(source, multiLine, caseSensitive, global) { | 115 static makeNative(source, multiLine, caseSensitive, global) { |
| 116 checkString(source); | 116 checkString(source); |
| 117 let m = dart.notNull(multiLine) ? 'm' : ''; | 117 let m = dart.notNull(multiLine) ? 'm' : ''; |
| 118 let i = dart.notNull(caseSensitive) ? '' : 'i'; | 118 let i = dart.notNull(caseSensitive) ? '' : 'i'; |
| 119 let g = dart.notNull(global) ? 'g' : ''; | 119 let g = dart.notNull(global) ? 'g' : ''; |
| 120 let regexp = function() { | 120 let regexp = (function() { |
| 121 try { | 121 try { |
| 122 return new RegExp(source, m + i + g); | 122 return new RegExp(source, m + i + g); |
| 123 } catch (e) { | 123 } catch (e) { |
| 124 return e; | 124 return e; |
| 125 } | 125 } |
| 126 | 126 |
| 127 }(); | 127 })(); |
| 128 if (regexp instanceof RegExp) | 128 if (regexp instanceof RegExp) |
| 129 return regexp; | 129 return regexp; |
| 130 let errorMessage = String(regexp); | 130 let errorMessage = String(regexp); |
| 131 throw new core.FormatException(`Illegal RegExp pattern: ${source}, ${error
Message}`); | 131 throw new core.FormatException(`Illegal RegExp pattern: ${source}, ${error
Message}`); |
| 132 } | 132 } |
| 133 firstMatch(string) { | 133 firstMatch(string) { |
| 134 let m = dart.as(this[_nativeRegExp].exec(checkString(string)), core.List$(
core.String)); | 134 let m = dart.as(this[_nativeRegExp].exec(checkString(string)), core.List$(
core.String)); |
| 135 if (m == null) | 135 if (m == null) |
| 136 return null; | 136 return null; |
| 137 return new _MatchImplementation(this, m); | 137 return new _MatchImplementation(this, m); |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1190 exports.Returns = Returns; | 1190 exports.Returns = Returns; |
| 1191 exports.JSName = JSName; | 1191 exports.JSName = JSName; |
| 1192 exports.JavaScriptIndexingBehavior = JavaScriptIndexingBehavior; | 1192 exports.JavaScriptIndexingBehavior = JavaScriptIndexingBehavior; |
| 1193 exports.TypeErrorImplementation = TypeErrorImplementation; | 1193 exports.TypeErrorImplementation = TypeErrorImplementation; |
| 1194 exports.CastErrorImplementation = CastErrorImplementation; | 1194 exports.CastErrorImplementation = CastErrorImplementation; |
| 1195 exports.FallThroughErrorImplementation = FallThroughErrorImplementation; | 1195 exports.FallThroughErrorImplementation = FallThroughErrorImplementation; |
| 1196 exports.RuntimeError = RuntimeError; | 1196 exports.RuntimeError = RuntimeError; |
| 1197 exports.random64 = random64; | 1197 exports.random64 = random64; |
| 1198 exports.jsonEncodeNative = jsonEncodeNative; | 1198 exports.jsonEncodeNative = jsonEncodeNative; |
| 1199 }); | 1199 }); |
| OLD | NEW |