MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / operator

Method operator

utils/vscode/src/parser/parser.go:649–654  ·  view source on GitHub ↗

operator returns the operator for the i'th token, or and empty string if the i'th token is not an operator.

(i int)

Source from the content-addressed store, hash-verified

647// operator returns the operator for the i'th token, or and empty string if the
648// i'th token is not an operator.
649func (p *parser) operator(i int) string {
650 if tok := p.tok(i); tok != nil && tok.Type == Operator {
651 return tok.Text(p.lines)
652 }
653 return ""
654}
655
656// ident returns the i'th token if it is an Ident, otherwise nil.
657func (p *parser) ident(i int) *Token {

Callers 1

instructionMethod · 0.95

Calls 2

tokMethod · 0.95
TextMethod · 0.45

Tested by

no test coverage detected