func (c *mirCtx) ParserDone() {
	close(c.ifaceChan)
}
ParserDone indicate parser done
package internal
import (
	"context"
	"sync"
	"github.com/alimy/mir/v2/core"
	_ "github.com/alimy/mir/v2/internal/generator"
	_ "github.com/alimy/mir/v2/internal/parser"
)
type mirCtx struct {
	context.Context
	mu            *sync.Mutex
	err           error
	capacity      int
	ifaceChan     chan *core.IfaceDescriptor
	generatorDone chan struct{}
	cancelFunc    context.CancelFunc
}
func (c *mirCtx) Err() error {
	c.mu.Lock()
	defer c.mu.Unlock()
	return c.err
}
func (c *mirCtx) Capcity() int {
	return c.capacity
}
func (c *mirCtx) Cancel(err error) {
	c.mu.Lock()
	defer c.mu.Unlock()
	if c.err != nil {
		c.err = err
		c.cancelFunc()
	}
}