MCPcopy
hub / github.com/golang/net / parseCurrentToken

Method parseCurrentToken

html/parse.go:2202–2221  ·  view source on GitHub ↗

parseCurrentToken runs the current token through the parsing routines until it is consumed.

()

Source from the content-addressed store, hash-verified

2200// parseCurrentToken runs the current token through the parsing routines
2201// until it is consumed.
2202func (p *parser) parseCurrentToken() {
2203 if p.tok.Type == SelfClosingTagToken {
2204 p.hasSelfClosingToken = true
2205 p.tok.Type = StartTagToken
2206 }
2207
2208 consumed := false
2209 for !consumed {
2210 if p.inForeignContent() {
2211 consumed = parseForeignContent(p)
2212 } else {
2213 consumed = p.im(p)
2214 }
2215 }
2216
2217 if p.hasSelfClosingToken {
2218 // This is a parse error, but ignore it.
2219 p.hasSelfClosingToken = false
2220 }
2221}
2222
2223func (p *parser) parse() (err error) {
2224 defer func() {

Callers 2

parseImpliedTokenMethod · 0.95
parseMethod · 0.95

Calls 2

inForeignContentMethod · 0.95
parseForeignContentFunction · 0.85

Tested by

no test coverage detected