Esempio n. 1
0
 public override RedILNode Resolve(Context context, ExpressionNode caller, ExpressionNode[] arguments)
 {
     return(BinaryExpressionNode.Create(BinaryExpressionOperator.NotEqual,
                                        new CallBuiltinLuaMethodNode(LuaBuiltinMethod.StringFind,
                                                                     new List <ExpressionNode>()
     {
         caller, arguments[0]
     }), new NilNode()));
 }
Esempio n. 2
0
            public override ExpressionNode Resolve(Context context, ExpressionNode caller)
            {
                if (_factor == 1)
                {
                    return(caller);
                }

                return(BinaryExpressionNode.Create(BinaryExpressionOperator.Multiply,
                                                   new ConstantValueNode(DataValueType.Float, _factor), caller));
            }
Esempio n. 3
0
        public override RedILNode Resolve(Context context, ExpressionNode caller, ExpressionNode[] arguments)
        {
            if (caller is null)
            {
                return(arguments.First());
            }

            return(BinaryExpressionNode.Create(BinaryExpressionOperator.StringConcat, BinaryExpressionNode.Create(
                                                   BinaryExpressionOperator.StringConcat, (ConstantValueNode)_prefix,
                                                   arguments.First()),
                                               BinaryExpressionNode.Create(BinaryExpressionOperator.StringConcat, (ConstantValueNode)" ", caller)));
        }
Esempio n. 4
0
            public override RedILNode Resolve(Context context, ExpressionNode caller, ExpressionNode[] arguments)
            {
                var arg = arguments.First();

                if (_factor == 1)
                {
                    return(arg);
                }

                return(BinaryExpressionNode.Create(BinaryExpressionOperator.Multiply,
                                                   new ConstantValueNode(DataValueType.Float, _factor), arg));
            }
 public override ExpressionNode Resolve(Context context, ExpressionNode caller)
 {
     return(BinaryExpressionNode.Create(BinaryExpressionOperator.And,
                                        BinaryExpressionNode.Create(BinaryExpressionOperator.NotEqual, caller, new NilNode()),
                                        BinaryExpressionNode.Create(BinaryExpressionOperator.NotEqual, caller, (ConstantValueNode)"")));
 }
 public override ExpressionNode Resolve(Context context, ExpressionNode caller)
 {
     return(BinaryExpressionNode.Create(BinaryExpressionOperator.Equal, caller, new NilNode()));
 }
 public override RedILNode Resolve(Context context, ExpressionNode caller, ExpressionNode[] arguments)
 {
     return(BinaryExpressionNode.Create(BinaryExpressionOperator.NotEqual,
                                        new TableKeyAccessNode(caller, arguments[0], DataValueType.Unknown), new NilNode()));
 }