示例#1
0
        protected override ILStatement CompileILStatement(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
        {
            GetConditionExpression().Compile(context, request, this_value);
            GetWhileStatement().Compile(context, request, this_value);

            return(new ILWhile(
                       GetConditionExpression().GetValue().GetILValue(),
                       GetWhileStatement().GetILStatement()
                       ));
        }
示例#2
0
 protected override CmlScriptValue CompileValue(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
 {
     return(this_value.GetIndirectValue(GetId())
            .AssertNotNull(() => new CmlRuntimeError_InvalidIdForTypeException("value", GetId(), this_value.GetValueType())));
 }
示例#3
0
 protected abstract CmlScriptValue CompileValue(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value);
示例#4
0
 public void Compile(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
 {
     value = CompileValue(context, request, this_value);
 }
示例#5
0
        protected override ILStatement CompileILStatement(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
        {
            GetIndirectionExpression().Compile(context, request, this_value);
            GetFunctionCall().Compile(context, request, GetIndirectionExpression().GetValue());

            return(GetFunctionCall().GetValue().GetILValue().CreateILCalculate());
        }
示例#6
0
        protected override ILStatement CompileILStatement(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
        {
            GetBlock().Compile(context, request, this_value);

            return(GetBlock().GetILBlock());
        }
示例#7
0
 public void Compile(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
 {
     il_statement = CompileILStatement(context, request, this_value);
 }
示例#8
0
 public void Compile(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value, CmlScriptValue l, CmlScriptValue r)
 {
     value = new CmlScriptValue_Basic(
         new ILBinaryOperatorInvokation(GetOperatorType(), l.GetILValue(), r.GetILValue())
         );
 }
示例#9
0
 protected override CmlScriptValue CompileValue(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
 {
     return(new CmlScriptValue_Basic(
                ILLiteral.New(GetConstant())
                ));
 }
示例#10
0
 protected abstract ILStatement CompileILStatement(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value);
示例#11
0
 public void AddExplicitIndirectValue(string id, CmlScriptValue value)
 {
     indirect_values.Add(id, value);
 }
示例#12
0
        protected override CmlScriptValue CompileValue(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
        {
            GetLeft().Compile(context, request, this_value);
            GetRight().Compile(context, request, this_value);

            GetOperator().Compile(context, request, this_value, GetLeft().GetValue(), GetRight().GetValue());
            return(GetOperator().GetValue());
        }
示例#13
0
        protected override ILStatement CompileILStatement(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
        {
            GetIndirectionExpression().Compile(context, request, this_value);
            GetValueReference().Compile(context, request, GetIndirectionExpression().GetValue());

            GetExpression().Compile(context, request, this_value);

            return(new ILAssign(
                       GetValueReference().GetValue().GetILValue(),
                       GetExpression().GetValue().GetILValue()
                       ));
        }
示例#14
0
 public void Compile(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
 {
     GetExpressions().Process(e => e.Compile(context, request, request));
 }
示例#15
0
        public void Compile(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
        {
            CmlScriptValue_Argument_Host parameter_host = request.AddPrimaryArgument(new CmlScriptValue_Argument_Host());

            GetFunctionParameters().Process(p => p.Inject(parameter_host, request));
        }
示例#16
0
        protected override CmlScriptValue CompileValue(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
        {
            GetValueReference().Compile(context, request, this_value);

            return(GetValueReference().GetValue());
        }
示例#17
0
 protected override CmlScriptValue CompileValue(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
 {
     return request.InsertThisRepresentationValue()
         .AssertNotNull(() => new CmlRuntimeError_InvalidIdException("representation", "this"));
 }
示例#18
0
        protected override CmlScriptValue CompileValue(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
        {
            GetIndirectionExpression().Compile(context, request, this_value);
            GetSubExpression().Compile(context, request, GetIndirectionExpression().GetValue());

            return(GetSubExpression().GetValue());
        }
示例#19
0
 protected override CmlScriptValue CompileValue(CmlContext context, CmlScriptRequest request, CmlScriptValue this_value)
 {
     return(request.GetParentValue());
 }