MCPcopy Create free account
hub / github.com/adhocteam/pushup / parseSectionKeyword

Method parseSectionKeyword

parser.go:906–920  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

904}
905
906func (p *codeParser) parseSectionKeyword() *nodeSection {
907 // enter function one past the "section" IDENT token
908 // FIXME(paulsmith): we are currently requiring that the name of the
909 // partial be a valid Go identifier, but there is no reason that need be
910 // the case. perhaps a string is better here.
911 if p.peek().tok != token.IDENT {
912 p.errorf("expected IDENT, got %s", p.peek().tok.String())
913 }
914 result := &nodeSection{name: p.peek().lit}
915 result.pos.start = p.parser.offset
916 p.advance()
917 result.pos.end = p.parser.offset
918 result.block = p.parseStmtBlock()
919 return result
920}
921
922func (p *codeParser) parsePartialKeyword() *nodePartial {
923 // enter function one past the "partial" IDENT token

Callers 1

parseCodeMethod · 0.95

Calls 5

peekMethod · 0.95
errorfMethod · 0.95
advanceMethod · 0.95
parseStmtBlockMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected