# Expect the root element is closed.
fun expect_root_closed: Bool do
if root_closed then
return true
else if element_path.length > 1 then
return fire_fatal_error("Reached the end of the file with " +
"{element_path.length.to_s} open elements.", null)
else
return fire_fatal_error("Reached the end of the file with an " +
"open element.", null)
end
end
lib/saxophonit/reader_model.nit:134,2--145,4