// BlockWith executes the block of template associated with
// the helper, think the block inside of an "if" or "each"
// statement. It takes a new context with which to evaluate
// the block.
333836
func (h HelperContext) BlockWith(ctx *Context) (string, error) {
	nev := newEvalVisitor(h.evalVisitor.template, ctx)
	nev.blockParams = h.evalVisitor.blockParams
	dd := nev.VisitProgram(h.evalVisitor.curBlock.Program)
	switch tp := dd.(type) {
	case string:
		return tp, nil
	case error:
		return "", errors.WithStack(tp)
	case nil:
		return "", nil
	default:
		return "", errors.WithStack(errors.Errorf("unknown return value %T %+v", dd, dd))
	}
}
1138500
func (q *Quest_Data) UpdateWith(other *Quest_Data) {
	pivot := len(q.BuiltBy)
	q.BuiltBy = append(q.BuiltBy, other.BuiltBy...)
	q.BuiltBy = q.BuiltBy[:set.Union(QuestTemplateSpecs(q.BuiltBy), pivot)]
}
291585
func (st *Runtime) YieldBlock(name string, context interface{}) {
	block, has := st.getBlock(name)

	if has == false {
		panic(fmt.Errorf("Block %q was not found!!", name))
	}

	if context != nil {
		current := st.context
		st.context = reflect.ValueOf(context)
		st.executeList(block.List)
		st.context = current
	}

	st.executeList(block.List)
}
1249724
func (bc *BlockChain) WriteBlockWithoutState(block *types.Block, td *big.Int) (err error) {
	bc.wg.Add(1)
	defer bc.wg.Done()

	if err := bc.hc.WriteTd(block.Hash(), block.NumberU64(), td); err != nil {
		return err
	}
	rawdb.WriteBlock(bc.db, block)

	return nil
}
1179097
func (tn *textNode) ProcessWith(p Processor) error {
	return p.Text(tn.text)
}
1263746
func (c *Client) WithHeader(ctx context.Context, header Header) context.Context {
	return context.WithValue(ctx, headerContext{}, header)
}
230154
func (w *Writer) writeBlock() {
	_, w.err = w.w.Write(w.buf[w.written:])
	w.i = 0
	w.j = headerSize
	w.written = 0
}
816708
func constructBlock(d *Dispenser) [][]interface{} {
	block := [][]interface{}{}

	for d.Next() {
		if d.Val() == "}" {
			break
		}
		block = append(block, constructLine(d))
	}

	return block
}
177487
func (db *DB) Blocks() []*Block {
	db.mtx.RLock()
	defer db.mtx.RUnlock()

	return db.blocks
}
611332
func (g *Group) BlockFunc(f func(*Group)) *Statement {
	s := BlockFunc(f)
	g.items = append(g.items, s)
	return s
}
1064593
func (v *MrbValue) CallBlock(method string, args ...Value) (*MrbValue, error) {
	if len(args) == 0 {
		return nil, fmt.Errorf("args must be non-empty and have a proc at the end")
	}

	n := len(args)
	return v.call(method, args[:n-1], args[n-1])
}
143446
func (t *Tree) Blocks() map[string]*BlockNode {
	return t.blocks[len(t.blocks)-1]
}
421693
func (a Args) With(key, value interface{}) Args {
	a2 := Args{key: value}
	for k, v := range a {
		a2[k] = v
	}
	return a2
}
561405
func (v *evalVisitor) popBlock() *ast.BlockStatement {
	if len(v.blocks) == 0 {
		return nil
	}

	var result *ast.BlockStatement
	result, v.blocks = v.blocks[len(v.blocks)-1], v.blocks[:len(v.blocks)-1]

	return result
}
1062621
func (n node) WithBatch(enabled bool) Node {
	n.batchMode = enabled
	return &n
}
89342
func (il IfLogger) With(values ...interface{}) ContextLogger {
	if len(values) == 1 {
		return &contextLogger{isTrue: il.ok(), data: values[0]}
	}
	return &contextLogger{isTrue: il.ok(), data: values}
}
513307
func deleteBlockWithoutNumber(db ethdb.Writer, hash common.Hash, number uint64) {
	DeleteReceipts(db, hash, number)
	deleteHeaderWithoutNumber(db, hash, number)
	DeleteBody(db, hash, number)
	DeleteTd(db, hash, number)
}