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

Method _nextToken

output/java/1.4.19/STLexer.java:234–246  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232 }
233
234 public Token _nextToken() {
235 //System.out.println("nextToken: c="+(char)c+"@"+input.index());
236 while ( true ) { // lets us avoid recursion when skipping stuff
237 startCharIndex = input.index();
238 startLine = input.getLine();
239 startCharPositionInLine = input.getCharPositionInLine();
240 if ( c==EOF ) return newToken(EOF_TYPE);
241 Token t;
242 if ( scanningInsideExpr ) t = inside();
243 else t = outside();
244 if ( t!= SKIP ) return t;
245 }
246 }
247
248 protected Token outside() {
249 if ( input.getCharPositionInLine()==0 && (c==' ' || c=='\t') ) {

Callers 1

nextTokenMethod · 0.95

Calls 6

newTokenMethod · 0.95
insideMethod · 0.95
outsideMethod · 0.95
getCharPositionInLineMethod · 0.80
indexMethod · 0.65
getLineMethod · 0.45

Tested by

no test coverage detected