Resolve() публичный Метод

public Resolve ( ScriptingContext context ) : Expression
context ScriptingContext
Результат Expression
Пример #1
0
        protected override bool DoResolve(ScriptingContext context)
        {
            if (Repeating)
                return true;

            expression = ParseExpression (context);
            if (expression == null)
                return false;

            expression = expression.Resolve (context);
            return expression != null;
        }
Пример #2
0
            protected override bool DoResolve(ScriptingContext context)
            {
                if ((Args == null) || (Args.Count != 1)) {
                    context.Print ("Invalid arguments: expression expected");
                    return false;
                }

                expression = ParseExpression (context);
                if (expression == null)
                    return false;

                expression = expression.Resolve (context);
                return expression != null;
            }
Пример #3
0
            protected override bool DoResolve(ScriptingContext context)
            {
                expr = DoParseExpression (context, arg);
                if (expr == null)
                    return false;

                expr = expr.Resolve (context);
                return expr != null;
            }
Пример #4
0
        protected override bool DoResolve(ScriptingContext context)
        {
            expression = ParseExpression (context);
            if (expression == null)
                return false;

            expression = expression.Resolve (context);
            if (expression == null)
                return false;

            pexpr = expression as PointerExpression;
            if (pexpr == null)
                throw new ScriptingException (
                    "Expression `{0}' is not a pointer.",
                    expression.Name);

            return true;
        }
Пример #5
0
        protected override bool DoResolve(ScriptingContext context)
        {
            if (Repeating)
                return true;

            if (Args == null)
                throw new ScriptingException ("Argument expected");

            if (Args.Count > 1) {
                string formatArgument = (string) Args [0];
                Match match = formatRegex.Match (formatArgument);

                if (match.Success) {
                    string countString = match.Groups [1].Value;
                    string formatString = match.Groups [2].Value;
                    string sizeString = match.Groups [3].Value;

                    if (countString != null && countString != "") {
                        count = Int32.Parse (countString);
                    }
                    if (formatString != null && formatString != "") {
                        format = formatString [0];
                    }
                    if (sizeString != null && sizeString != "") {
                        size = sizeString [0];
                    }

                    //context.Print ("EXAMINE: count {0}, format{1}, size {2}", count, format, size);

                    Args.RemoveAt (0);
                    //context.Print ("EXAMINE: Argument now is '" + Argument + "'");
                } else {
                    //context.Print ("EXAMINE: " + formatArgument + " did not match");
                    if (formatArgument.Length > 0 && formatArgument [0] == '/') {
                        throw new ScriptingException ("Invalid format " + formatArgument);
                    }
                }
            } else {
                //context.Print ("EXAMINE: by default: count {0}, format{1}, size {2}", count, format, size);
            }

            if (format == '_') {
                format = 'x';
            }
            if (size == '_') {
                size = DefaultSize ();
            }
            //context.Print ("EXAMINE: finally: count {0}, format{1}, size {2}", count, format, size);

            expression = ParseExpression (context);
            if (expression == null)
                return false;

            expression = expression.Resolve (context);
            return expression != null;
        }
Пример #6
0
        protected override bool DoResolve(ScriptingContext context)
        {
            if (Repeating)
                return true;

            if (Argument != "") {
                if (count < 0)
                    count = 1;

                expression = ParseExpression (context);
                if (expression == null)
                    return false;

                expression = expression.Resolve (context);
                return expression != null;
            }

            if (count < 0)
                count = 10;

            address = CurrentFrame.TargetAddress;
            method = CurrentFrame.Method;
            return true;
        }