ParseProperties . Grabs any tag or anchor tokens and deals with them.
| 372 | // ParseProperties |
| 373 | // . Grabs any tag or anchor tokens and deals with them. |
| 374 | void SingleDocParser::ParseProperties(std::string& tag, anchor_t& anchor, |
| 375 | std::string& anchor_name) { |
| 376 | tag.clear(); |
| 377 | anchor_name.clear(); |
| 378 | anchor = NullAnchor; |
| 379 | |
| 380 | while (true) { |
| 381 | if (m_scanner.empty()) |
| 382 | return; |
| 383 | |
| 384 | switch (m_scanner.peek().type) { |
| 385 | case Token::TAG: |
| 386 | ParseTag(tag); |
| 387 | break; |
| 388 | case Token::ANCHOR: |
| 389 | ParseAnchor(anchor, anchor_name); |
| 390 | break; |
| 391 | default: |
| 392 | return; |
| 393 | } |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | void SingleDocParser::ParseTag(std::string& tag) { |
| 398 | Token& token = m_scanner.peek(); |