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

Method parseXMLExpression

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

Source from the content-addressed store, hash-verified

661 * XMLExpressionBody ::= ( S? '/>' ) | ( S? '>' (Char* - (char* '<')) CDSect?)* ETag ) | <TRANSLATION_ERROR>
662 */
663 private void parseXMLExpression(Node parent) throws JasperException {
664 reader.skipSpaces();
665 if (!reader.matches("/>")) {
666 if (!reader.matches(">")) {
667 err.jspError(start, "jsp.error.unterminated", "&lt;jsp:expression&gt;");
668 }
669 Mark stop;
670 String text;
671 while (true) {
672 start = reader.mark();
673 stop = reader.skipUntil("<");
674 if (stop == null) {
675 err.jspError(start, "jsp.error.unterminated", "&lt;jsp:expression&gt;");
676 }
677 text = parseScriptText(reader.getText(start, stop));
678 @SuppressWarnings("unused")
679 Node unused = new Node.Expression(text, start, parent);
680 if (reader.matches("![CDATA[")) {
681 start = reader.mark();
682 stop = reader.skipUntil("]]>");
683 if (stop == null) {
684 err.jspError(start, "jsp.error.unterminated", "CDATA");
685 }
686 text = parseScriptText(reader.getText(start, stop));
687 @SuppressWarnings("unused")
688 Node unused2 = new Node.Expression(text, start, parent);
689 } else {
690 break;
691 }
692 }
693 if (!reader.matchesETagWithoutLessThan("jsp:expression")) {
694 err.jspError(start, "jsp.error.unterminated", "&lt;jsp:expression&gt;");
695 }
696 }
697 }
698
699 /*
700 * ELExpressionBody. Starts with "#{" or "${". Ends with "}". See JspReader.skipELExpression().

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