示例#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()));
 }
示例#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));
            }
示例#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)));
        }
示例#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()));
 }