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

Method outside

output/java/1.4.17/STLexer.java:247–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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