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

Method parseXMLScriptlet

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

Source from the content-addressed store, hash-verified

728 * XMLScriptletBody ::= ( S? '/>' ) | ( S? '>' (Char* - (char* '<')) CDSect?)* ETag ) | <TRANSLATION_ERROR>
729 */
730 private void parseXMLScriptlet(Node parent) throws JasperException {
731 reader.skipSpaces();
732 if (!reader.matches("/>")) {
733 if (!reader.matches(">")) {
734 err.jspError(start, "jsp.error.unterminated", "&lt;jsp:scriptlet&gt;");
735 }
736 Mark stop;
737 String text;
738 while (true) {
739 start = reader.mark();
740 stop = reader.skipUntil("<");
741 if (stop == null) {
742 err.jspError(start, "jsp.error.unterminated", "&lt;jsp:scriptlet&gt;");
743 }
744 text = parseScriptText(reader.getText(start, stop));
745 @SuppressWarnings("unused")
746 Node unused = new Node.Scriptlet(text, start, parent);
747 if (reader.matches("![CDATA[")) {
748 start = reader.mark();
749 stop = reader.skipUntil("]]>");
750 if (stop == null) {
751 err.jspError(start, "jsp.error.unterminated", "CDATA");
752 }
753 text = parseScriptText(reader.getText(start, stop));
754 @SuppressWarnings("unused")
755 Node unused2 = new Node.Scriptlet(text, start, parent);
756 } else {
757 break;
758 }
759 }
760
761 if (!reader.matchesETagWithoutLessThan("jsp:scriptlet")) {
762 err.jspError(start, "jsp.error.unterminated", "&lt;jsp:scriptlet&gt;");
763 }
764 }
765 }
766
767 /**
768 * Param ::= '&lt;jsp:param' S Attributes S? EmptyBody S?

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