MCPcopy Index your code
hub / github.com/apache/tomcat / parseXMLDeclaration

Method parseXMLDeclaration

java/org/apache/jasper/compiler/Parser.java:609–644  ·  view source on GitHub ↗
(Node parent)

Source from the content-addressed store, hash-verified

607 * ::= CDStart CData CDEnd CDStart ::= '<![CDATA[' CData ::= (Char* - (Char* ']]>' Char*)) CDEnd ::= ']]>'
608 */
609 private void parseXMLDeclaration(Node parent) throws JasperException {
610 reader.skipSpaces();
611 if (!reader.matches("/>")) {
612 if (!reader.matches(">")) {
613 err.jspError(start, "jsp.error.unterminated", "&lt;jsp:declaration&gt;");
614 }
615 Mark stop;
616 String text;
617 while (true) {
618 start = reader.mark();
619 stop = reader.skipUntil("<");
620 if (stop == null) {
621 err.jspError(start, "jsp.error.unterminated", "&lt;jsp:declaration&gt;");
622 }
623 text = parseScriptText(reader.getText(start, stop));
624 @SuppressWarnings("unused")
625 Node unused = new Node.Declaration(text, start, parent);
626 if (reader.matches("![CDATA[")) {
627 start = reader.mark();
628 stop = reader.skipUntil("]]>");
629 if (stop == null) {
630 err.jspError(start, "jsp.error.unterminated", "CDATA");
631 }
632 text = parseScriptText(reader.getText(start, stop));
633 @SuppressWarnings("unused")
634 Node unused2 = new Node.Declaration(text, start, parent);
635 } else {
636 break;
637 }
638 }
639
640 if (!reader.matchesETagWithoutLessThan("jsp:declaration")) {
641 err.jspError(start, "jsp.error.unterminated", "&lt;jsp:declaration&gt;");
642 }
643 }
644 }
645
646 /*
647 * ExpressionBody ::= (Char* - (char* '%>')) '%>'

Callers 1

parseElementsMethod · 0.95

Calls 8

parseScriptTextMethod · 0.95
matchesMethod · 0.65
jspErrorMethod · 0.65
skipSpacesMethod · 0.45
markMethod · 0.45
skipUntilMethod · 0.45
getTextMethod · 0.45

Tested by

no test coverage detected