pulsar/native/v8_extensions/onig_reg_exp.js
Nathan Sobo 031da13316 Remove unused methods from native OnigRegExp
`OnigScanner` takes over these duties
2012-10-25 12:23:37 -06:00

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;
})();