MCPcopy Index your code
hub / github.com/antlr/codebuff / outside

Method outside

output/java8/1.4.19/STLexer.java:243–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

241 }
242
243 protected Token outside() {
244 if ( input.getCharPositionInLine()==0 && (c==' ' || c=='\t') ) {
245 while ( c==' ' || c=='\t' ) consume(); // scarf indent
246 if ( c!= EOF ) return newToken(INDENT);
247 return newToken(TEXT);
248 }
249
250 if ( c==delimiterStartChar ) {
251 consume();
252 if ( c=='!' ) return COMMENT();
253 if ( c=='\\' ) return ESCAPE(); // <\\> <\uFFFF> <\n> etc...
254 scanningInsideExpr = true;
255 return newToken(LDELIM);
256 }
257
258 if ( c=='\r' ) {
259 consume();
260 consume();
261 return newToken(NEWLINE);
262 } // \r\n -> \n
263
264 if ( c=='\n' ) {
265 consume();
266 return newToken(NEWLINE);
267 }
268
269 if ( c=='}' && subtemplateDepth>0) {
270 scanningInsideExpr = true;
271 subtemplateDepth--;
272 consume();
273 return newTokenFromPreviousChar(RCURLY);
274 }
275 return mTEXT();
276 }
277
278 protected Token inside() {
279 while ( true ) {

Callers 1

_nextTokenMethod · 0.95

Calls 7

consumeMethod · 0.95
newTokenMethod · 0.95
COMMENTMethod · 0.95
ESCAPEMethod · 0.95
mTEXTMethod · 0.95
getCharPositionInLineMethod · 0.80

Tested by

no test coverage detected