mirror of
https://github.com/atom/atom.git
synced 2026-02-12 15:45:23 -05:00
20 lines
455 B
JavaScript
20 lines
455 B
JavaScript
(function() {
|
|
native function buildOnigRegExp(source);
|
|
native function search(string, index);
|
|
native function test(string);
|
|
|
|
function OnigRegExp(source) {
|
|
var regexp = buildOnigRegExp(source);
|
|
regexp.constructor = OnigRegExp;
|
|
regexp.__proto__ = OnigRegExp.prototype;
|
|
regexp.source = source;
|
|
return regexp;
|
|
}
|
|
|
|
OnigRegExp.prototype.search = search;
|
|
OnigRegExp.prototype.test = test;
|
|
|
|
this.OnigRegExp = OnigRegExp;
|
|
})();
|
|
|