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

Method parse

utils/vscode/src/parser/parser.go:408–422  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

406}
407
408func (p *parser) parse() error {
409 for i := 0; i < len(p.toks); {
410 if p.newline(i) || p.comment(i) {
411 i++
412 continue
413 }
414 if n := p.instruction(i); n > 0 {
415 i += n
416 } else {
417 p.unexpected(i)
418 i++
419 }
420 }
421 return nil
422}
423
424// instruction parses the instruction starting at the i'th token.
425func (p *parser) instruction(i int) (n int) {

Callers 1

ParseFunction · 0.95

Calls 4

newlineMethod · 0.95
commentMethod · 0.95
instructionMethod · 0.95
unexpectedMethod · 0.95

Tested by

no test coverage detected