// getClass returns the CSS class name associated with tok.
168260
func (h *Highlighter) getClass(tok token.Token) string {
	switch {
	case tok.IsKeyword():
		return h.KeywordClass
	case tok.IsLiteral():
		if tok == token.IDENT {
			return h.IdentClass
		} else {
			return h.LiteralClass
		}
	case tok.IsOperator():
		return h.OperatorClass
	case tok == token.COMMENT:
		return h.CommentClass
	case tok == token.ILLEGAL:
		break
	default:
		panic(fmt.Sprintf("unknown token type: %v", tok))
	}
	return ""
}
963050
func (f *Field) ErrorClass() string {
	if f.Error != nil {
		if errorClass, ok := f.viewArgs["ERROR_CLASS"]; ok {
			return errorClass.(string)
		}
		return ErrorCSSClass
	}
	return ""
}
755182
func (p *Partition) Class(w string) (int, error) {
	n, ok := p.words[w]
	if !ok {
		return 0, &NotFoundError{w}
	}
	return n, nil
}
31887
func (f *FieldSetType) RemoveClass(class string) *FieldSetType {
	delete(f.class, class)
	return f
}
928485
func GetSlotTeamClass(lobbytype Format, slot int) (team, class string, err error) {
	classList := typeClassList[lobbytype]

	teamI, classI, err := getSlotNums(lobbytype, slot)
	if err == nil {
		team, class, err = teamList[teamI], classList[classI], nil
	}
	return
}
406023
func Rune2Class(r rune) int {
	if r >= 0 && r < 0x80 { // Keep ASCII as it is.
		return int(r)
	}
	if unicode.IsLetter(r) {
		return classUnicodeLeter
	}
	if unicode.IsDigit(r) {
		return classUnicodeDigit
	}
	if unicode.IsGraphic(r) {
		return classUnicodeGraphic
	}
	if r == lex.RuneEOF {
		return int(r)
	}
	return classOther
}
795464
func (surface *Surface) GetType() SurfaceType {
	ret := SurfaceType(C.cairo_surface_get_type(surface.Ptr))
	if err := surface.status(); err != nil {
		panic(err)
	}
	return ret
}
330954
func (_m *Light) GetColor() (common.Color, error) {
	ret := _m.Called()

	var r0 common.Color
	if rf, ok := ret.Get(0).(func() common.Color); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(common.Color)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
436318
func (s *Selection) HasClass(class string) bool {
	class = " " + class + " "
	for _, n := range s.Nodes {
		classes, _ := getClassesAndAttr(n, false)
		if strings.Contains(classes, class) {
			return true
		}
	}
	return false
}
80163
func (base *Base) AddClass(class string) {
	base.Classes = append(base.Classes, class)
}
6978
func (p *nfsProvisioner) getClassForVolume(pv *v1.PersistentVolume) (*storage.StorageClass, error) {
	if p.client == nil {
		return nil, fmt.Errorf("Cannot get kube client")
	}
	className := helper.GetPersistentVolumeClass(pv)
	if className == "" {
		return nil, fmt.Errorf("Volume has no storage class")
	}
	class, err := p.client.StorageV1().StorageClasses().Get(className, metav1.GetOptions{})
	if err != nil {
		return nil, err
	}
	return class, nil
}
130878
func getDefaultStorageClass(location string) (string, error) {
	if _, ok := GCSMultiRegionalLocations[location]; ok {
		return defaultMultiRegionalStorageClass, nil
	}
	if _, ok := GCSRegionalLocations[location]; ok {
		return defaultRegionalStorageClass, nil
	}
	return "", ErrUnknownLocation
}
514439
func (c *Client) Get(objectID string, object Object) error {
	className, err := objectTypeName(object)
	if err != nil {
		return err
	}
	return c.GetClass(className, objectID, object)
}
774088
func (t *TreeEntry) GetType() string {
	if t == nil || t.Type == nil {
		return ""
	}
	return *t.Type
}
978196
func (c *FakePriorityClasses) Get(name string, options v1.GetOptions) (result *v1beta1.PriorityClass, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootGetAction(priorityclassesResource, name), &v1beta1.PriorityClass{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.PriorityClass), err
}
952769
func (s Style) GetFont(defaults ...*truetype.Font) *truetype.Font {
	if s.Font == nil {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return nil
	}
	return s.Font
}
1222826
func parseClass(sc *scanner, allowset bool) class {
	ch := sc.Next()
	switch ch {
	case '%':
		return &singleClass{sc.Next()}
	case '.':
		if allowset {
			return &dotClass{}
		}
		return &charClass{ch}
	case '[':
		if allowset {
			return parseClassSet(sc)
		}
		return &charClass{ch}
	//case '^' '$', '(', ')', ']', '*', '+', '-', '?':
	//	panic(newError(sc.CurrentPos(), "invalid %c", ch))
	case EOS:
		panic(newError(sc.CurrentPos(), "unexpected EOS"))
	default:
		return &charClass{ch}
	}
}