(parser)
| 26597 | } |
| 26598 | |
| 26599 | function end (parser) { |
| 26600 | if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag') |
| 26601 | if ((parser.state !== S.BEGIN) && |
| 26602 | (parser.state !== S.BEGIN_WHITESPACE) && |
| 26603 | (parser.state !== S.TEXT)) { |
| 26604 | error(parser, 'Unexpected end') |
| 26605 | } |
| 26606 | closeText(parser) |
| 26607 | parser.c = '' |
| 26608 | parser.closed = true |
| 26609 | emit(parser, 'onend') |
| 26610 | SAXParser.call(parser, parser.strict, parser.opt) |
| 26611 | return parser |
| 26612 | } |
| 26613 | |
| 26614 | function strictFail (parser, message) { |
| 26615 | if (typeof parser !== 'object' || !(parser instanceof SAXParser)) { |
no test coverage detected