package util

type BlockClassify struct {
	Type     map[string][]*NameCode
	Classify map[string]*TagFile
}

func (b *BlockClassify) GetClassify(tp string, src []string) (map[string]bool, []string) {
	m := map[string]bool{}
	array := []string{}
	for _, v := range src {
		v = TrimLRAll(v, "")
		flag := false
		for _, vv := range b.Type[tp] {
			if ok, _ := b.Classify[vv.Name].Match(v); ok {
				m[vv.Code] = true
				flag = true
				break
			} else {
			}
		}
		if !flag {
			array = append(array, v)
		}
	}
	return m, array
}
