# File nqxml/treeparser.rb, line 62 def handleTagEnd(entity) # Make sure stack isn't empty if @nodeStack.empty? str = "end tag '#{entity.name}' without opening tag" raise ParserError.new(str, @tokenizer) end # Make sure this tag name matches popped tag lastSeen = @nodeStack.last if entity.name != lastSeen.entity.name str = "end tag '#{entity.name}' does not match" + " last-seen start tag named '#{lastSeen.entity.name}' " raise ParserError.new(str, @tokenizer) end @nodeStack.pop() # If this is the close of the root node, we are now in the # document's epilogue where only misc tags are allowed. if @nodeStack.empty? @documentSection = DOCUMENT_EPILOGUE:DOCUMENT_EPILOGUE end end