public override StringBuilder VisitVariableRef(VariableRefExpression expression, SymbolTable scope)
        {
            append("var {0}".FormatWith(expression.Name));
            appendType(expression);

            return(_result);
        }
        public override Invokee VisitVariableRef(FP.VariableRefExpression expression, SymbolTable scope)
        {
            // HACK, for now, $this is special, and we handle in run-time, not compile time...
            if (expression.Name == "builtin.this")
            {
                return(InvokeeFactory.GetThis);
            }

            // HACK, for now, $this is special, and we handle in run-time, not compile time...
            if (expression.Name == "builtin.that")
            {
                return(InvokeeFactory.GetThat);
            }

            // HACK, for now, %context is special, and we handle in run-time, not compile time...
            if (expression.Name == "context")
            {
                return(InvokeeFactory.GetContext);
            }

            // HACK, for now, %context is special, and we handle in run-time, not compile time...
            if (expression.Name == "resource")
            {
                return(InvokeeFactory.GetResource);
            }


            // Variables are still functions without arguments. For now variables are treated separately here,
            //Functions are handled elsewhere.
            return(resolve(scope, expression.Name, Enumerable.Empty <Type>()));
        }
Beispiel #3
0
 public abstract T VisitVariableRef(VariableRefExpression expression, SymbolTable scope);