Example #1
0
        public static Expression GetValue(Instruction instruction, HTMLCompiler compiler)
        {
            if (instruction == null)
            {
                return(null);
            }

            var creator = new HTMLValues(compiler);

            instruction.VisitMe(creator);
            var expression = compiler.CompileBlock(creator._emitted);

            return(expression);
        }
Example #2
0
        public Expression GetValue(Instruction instruction)
        {
            if (instruction == null)
            {
                return(null);
            }

            var value = HTMLValues.GetValue(instruction, this);

            if (instruction.IsStatic())
            {
                return(precomputeExpression(value));
            }

            return(value);
        }