MCPcopy Create free account
hub / github.com/cogentcore/core / IsWord

Method IsWord

shell/paths.go:113–115  ·  view source on GitHub ↗

IsWord returns true if the token is some kind of word-like entity, including IDENT, STRING, CHAR, or one of the Go keywords. This is for exec filtering.

()

Source from the content-addressed store, hash-verified

111// including IDENT, STRING, CHAR, or one of the Go keywords.
112// This is for exec filtering.
113func (tk *Token) IsWord() bool {
114 return tk.Tok == token.IDENT || tk.IsGo() || tk.Tok == token.STRING || tk.Tok == token.CHAR
115}

Callers 1

PathMethod · 0.80

Calls 1

IsGoMethod · 0.95

Tested by

no test coverage detected