Returns true if the current node's kind is same as NodeKind::Element:: .
(&mut self, element_kind: ElementKind)
| 154 | |
| 155 | /// Returns true if the current node's kind is same as NodeKind::Element::<element_kind>. |
| 156 | fn pop_current_node(&mut self, element_kind: ElementKind) -> bool { |
| 157 | let current = match self.stack_of_open_elements.last() { |
| 158 | Some(n) => n, |
| 159 | None => return false, |
| 160 | }; |
| 161 | |
| 162 | if current.borrow().element_kind() == Some(element_kind) { |
| 163 | self.stack_of_open_elements.pop(); |
| 164 | return true; |
| 165 | } |
| 166 | |
| 167 | false |
| 168 | } |
| 169 | |
| 170 | /// Pops nodes until a node with `element_kind` comes. |
| 171 | fn pop_until(&mut self, element_kind: ElementKind) { |
no test coverage detected