Beispiel #1
0
        // ECMA 262 - 15.10.6.3
        private void test(ref mdr.CallFrame callFrame)
        {
            Debug.WriteLine("calling JSRegExp.test");
            string  S = Operations.Convert.ToString.Run(ref callFrame.Arg0);
            DRegExp R = callFrame.This as DRegExp;

            LastDRegExp = R;
            if (R != null && R.MatchImplementation(S) != null)
            {
                if (R.MatchedGroups.Count > MaxMatchedGroupIndex)
                {
                    for (var i = 0; i < (R.MatchedGroups.Count - MaxMatchedGroupIndex); i++)
                    {
                        AddNewMatchedGroup();
                    }
                }
                callFrame.Return.Set(true);
            }
            else
            {
                callFrame.Return.Set(false);
            }
        }