mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-13 08:44:12 +03:00
031da13316
`OnigScanner` takes over these duties
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;
|
|
})();
|
|
|