public bool VisitCallRedisMethodNode(CallRedisMethodNode node, CompilationState state) { node.Caller.AcceptVisitor(this, state); state.Write(".pcall('"); switch (node.Method) { case RedisCommand.Get: state.Write("get"); break; case RedisCommand.Set: state.Write("set"); break; case RedisCommand.HGet: state.Write("hget"); break; case RedisCommand.HMGet: state.Write("hmget"); break; case RedisCommand.HSet: state.Write("hset"); break; default: throw new LuaCompilationException($"Unsupported redis method '{node.Method}'"); } state.Write("'"); WriteArguments(state, node.Arguments, false); state.Write(")"); return(true); }
public bool VisitCallRedisMethodNode(CallRedisMethodNode node, CompilationState state) { node.Caller.AcceptVisitor(this, state); state.Write(".pcall("); node.Method.AcceptVisitor(this, state); WriteArguments(state, node.Arguments, false); state.Write(")"); return(true); }