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

Method addIdentRef

utils/vscode/src/parser/parser.go:709–717  ·  view source on GitHub ↗

addIdentRef adds a identifier reference for the token ref.

(ref *Token)

Source from the content-addressed store, hash-verified

707
708// addIdentRef adds a identifier reference for the token ref.
709func (p *parser) addIdentRef(ref *Token) {
710 id := ref.Text(p.lines)
711 i, existing := p.idents[id]
712 if !existing {
713 i = &Identifier{}
714 p.idents[id] = i
715 }
716 i.References = append(i.References, ref)
717}
718
719// err appends an fmt.Printf style error into l.diags for the given token.
720func (p *parser) err(tok *Token, msg string, args ...interface{}) {

Callers 1

operandMethod · 0.95

Calls 1

TextMethod · 0.45

Tested by

no test coverage detected