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

Method skipUntilEL

java/org/apache/jasper/compiler/ELParser.java:196–217  ·  view source on GitHub ↗

Skip until an EL expression ('${' || '#{') is reached, allowing escape sequences '\$' and '\#'. @return The text string up to the EL expression

()

Source from the content-addressed store, hash-verified

194 * @return The text string up to the EL expression
195 */
196 private String skipUntilEL() {
197 StringBuilder buf = new StringBuilder();
198 while (hasNextChar()) {
199 char ch = nextChar();
200 if (ch == '\\') {
201 // Is this the start of a "\$" or "\#" escape sequence?
202 char p0 = peek(0);
203 if (p0 == '$' || (p0 == '#' && !isDeferredSyntaxAllowedAsLiteral)) {
204 buf.append(nextChar());
205 } else {
206 buf.append(ch);
207 }
208 } else if ((ch == '$' || (ch == '#' && !isDeferredSyntaxAllowedAsLiteral)) && peek(0) == '{') {
209 this.type = ch;
210 nextChar();
211 break;
212 } else {
213 buf.append(ch);
214 }
215 }
216 return buf.toString();
217 }
218
219
220 /**

Callers 1

parseMethod · 0.95

Calls 5

hasNextCharMethod · 0.95
nextCharMethod · 0.95
peekMethod · 0.95
toStringMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected