jscript: Added RegExp.leftContext implementation.

This commit is contained in:
Jacek Caban 2010-05-26 19:18:32 +02:00 committed by Alexandre Julliard
parent 32c61c5092
commit 9159ddce92
1 changed files with 21 additions and 2 deletions

View File

@ -3999,10 +3999,29 @@ HRESULT regexp_string_match(script_ctx_t *ctx, DispatchEx *re, BSTR str,
static HRESULT RegExpConstr_leftContext(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{
FIXME("\n");
TRACE("\n");
switch(flags) {
case DISPATCH_PROPERTYGET: {
BSTR ret;
ret = SysAllocStringLen(ctx->last_match, ctx->last_match_index);
if(!ret)
return E_OUTOFMEMORY;
V_VT(retv) = VT_BSTR;
V_BSTR(retv) = ret;
}
case DISPATCH_PROPERTYPUT:
return S_OK;
default:
FIXME("unsupported flags\n");
return E_NOTIMPL;
}
return S_OK;
}
static HRESULT RegExpConstr_rightContext(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{