MCPcopy
hub / github.com/hashicorp/hcl / TokenMatches

Method TokenMatches

hclsyntax/keywords.go:19–24  ·  view source on GitHub ↗
(token Token)

Source from the content-addressed store, hash-verified

17var endforKeyword = Keyword([]byte{'e', 'n', 'd', 'f', 'o', 'r'})
18
19func (kw Keyword) TokenMatches(token Token) bool {
20 if token.Type != TokenIdent {
21 return false
22 }
23 return bytes.Equal([]byte(kw), token.Bytes)
24}

Callers 5

parseTemplatePartsMethod · 0.80
parseTupleConsMethod · 0.80
parseObjectConsMethod · 0.80
finishParsingForExprMethod · 0.80
spaceAfterTokenFunction · 0.80

Calls 1

EqualMethod · 0.80

Tested by

no test coverage detected