PUBLIC void ejsConfigureRegExpType(Ejs *ejs) { EjsType *type; EjsPot *prototype; if ((type = ejsFinalizeCoreType(ejs, N("ejs", "RegExp"))) == 0) { return; } prototype = type->prototype; ejsBindConstructor(ejs, type, regex_Constructor); ejsBindMethod(ejs, prototype, ES_RegExp_exec, regex_exec); ejsBindAccess(ejs, prototype, ES_RegExp_lastIndex, regex_getLastIndex, regex_setLastIndex); ejsBindMethod(ejs, prototype, ES_RegExp_global, regex_getGlobalFlag); ejsBindMethod(ejs, prototype, ES_RegExp_ignoreCase, regex_getIgnoreCase); ejsBindMethod(ejs, prototype, ES_RegExp_multiline, regex_getMultiline); ejsBindMethod(ejs, prototype, ES_RegExp_source, regex_getSource); ejsBindMethod(ejs, prototype, ES_RegExp_matched, regex_matched); ejsBindMethod(ejs, prototype, ES_RegExp_start, regex_start); ejsBindMethod(ejs, prototype, ES_RegExp_sticky, regex_sticky); ejsBindMethod(ejs, prototype, ES_RegExp_test, regex_test); ejsBindMethod(ejs, prototype, ES_RegExp_toString, ejsRegExpToString); }
PUBLIC void ejsConfigureXMLListType(Ejs *ejs) { EjsType *type; EjsPot *prototype; if ((type = ejsFinalizeCoreType(ejs, N("ejs", "XMLList"))) == 0) { return; } prototype = type->prototype; ejsBindConstructor(ejs, type, xmlListConstructor); ejsBindMethod(ejs, prototype, ES_XMLList_length, xlLength); ejsBindMethod(ejs, prototype, ES_XMLList_name, getXmlListNodeName); ejsBindMethod(ejs, prototype, ES_XMLList_parent, (EjsProc) xl_parent); #if FUTURE ejsBindMethod(ejs, prototype, "name", name, NULL); ejsBindMethod(ejs, prototype, "valueOf", valueOf, NULL); #endif ejsBindMethod(ejs, prototype, ES_XMLList_toJSON, xmlListToJson); ejsBindMethod(ejs, prototype, ES_XMLList_toString, xmlListToString); ejsBindMethod(ejs, prototype, ES_XMLList_iterator_get, getXmlListIterator); ejsBindMethod(ejs, prototype, ES_XMLList_iterator_getValues, getXmlListValues); }