MCPcopy Index your code
hub / github.com/expr-lang/expr / Is

Method Is

parser/lexer/token.go:34–44  ·  view source on GitHub ↗
(kind Kind, values ...string)

Source from the content-addressed store, hash-verified

32}
33
34func (t Token) Is(kind Kind, values ...string) bool {
35 if kind != t.Kind {
36 return false
37 }
38 for _, v := range values {
39 if v == t.Value {
40 return true
41 }
42 }
43 return len(values) == 0
44}

Callers 15

ParseMethod · 0.80
nextMethod · 0.80
expectMethod · 0.80
parseExpressionMethod · 0.80
parseConditionalIfMethod · 0.80
parseConditionalMethod · 0.80
parsePrimaryMethod · 0.80
parseSecondaryMethod · 0.80
parseCallMethod · 0.80
parseArgumentsMethod · 0.80
parsePredicateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected