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

Method outside

output/java8/1.4.13/STLexer.java:237–270  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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