MCPcopy Create free account
hub / github.com/antlr/codebuff / outside

Method outside

output/java/1.4.13/STLexer.java:245–278  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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