MCPcopy Index your code
hub / github.com/RustPython/RustPython / parse

Method parse

Lib/test/test_pulldom.py:245–263  ·  view source on GitHub ↗
(self, _)

Source from the content-addressed store, hash-verified

243 self._handler = handler
244
245 def parse(self, _):
246 h = self._handler
247 h.startDocument()
248
249 # The next two items ensure that items preceding the first
250 # start_element are properly stored and emitted:
251 h.comment("a comment")
252 h.processingInstruction("target", "data")
253
254 h.startElement("html", AttributesImpl({}))
255
256 h.comment("a comment")
257 h.processingInstruction("target", "data")
258
259 h.startElement("p", AttributesImpl({"class": "paraclass"}))
260 h.characters("text")
261 h.endElement("p")
262 h.endElement("html")
263 h.endDocument()
264
265 def stub(self, *args, **kwargs):
266 """Stub method. Does nothing."""

Callers 2

test_parseMethod · 0.45
test_thorough_parseMethod · 0.45

Calls 8

AttributesImplClass · 0.90
startDocumentMethod · 0.45
commentMethod · 0.45
processingInstructionMethod · 0.45
startElementMethod · 0.45
charactersMethod · 0.45
endElementMethod · 0.45
endDocumentMethod · 0.45

Tested by

no test coverage detected