Пример #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());
 }