Пример #1
0
        public override complexFunctionCallClass complexFunctionCall(complexFunctionCallClass context)
        {
            var scope = scopeChain(context.chain, context._this == null? indexed : indexed.Parent);

            // in case of this.function() in a class method
            if (context._this != null && scope == null && indexed.Parent != null)
            {
                scope = indexed.Parent;
            }

            BaseAHKNode retVal = null;

            switch (context.function)
            {
            case functionCallClass o:
                o.extraInfo = scope;
                retVal      = functionCall(o);
                break;

            case dotUnwrapClass o:
                o.variableOrFunction.extraInfo = scope;
                retVal = functionCall((functionCallClass)o.variableOrFunction);
                break;
            }

            if (retVal == null)
            {
                return(null);
            }

            // context.extraInfo = retVal is VariableValue v? v.Value : retVal.extraInfo;
            context.extraInfo = retVal.extraInfo;
            return(context);
        }
Пример #2
0
 public virtual string complexFunctionCall(complexFunctionCallClass context)
 {
     return(context.defaultValue);
 }
Пример #3
0
 public override complexFunctionCallClass complexFunctionCall(complexFunctionCallClass context)
 {
     return(visitor.complexFunctionCall(context));
 }