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

Method getWSCategoryStr

src/org/antlr/codebuff/Formatter.java:475–483  ·  view source on GitHub ↗
(int injectNL_WS)

Source from the content-addressed store, hash-verified

473 }
474
475 public static String getWSCategoryStr(int injectNL_WS) {
476 int[] elements = Trainer.triple(injectNL_WS);
477 int cat = injectNL_WS&0xFF;
478 String catS = "none";
479 if ( cat==CAT_INJECT_NL ) catS = "'\\n'";
480 else if ( cat==CAT_INJECT_WS ) catS = "' '";
481 else return null;
482 return String.format("%4s|%d|%d", catS, elements[0], elements[1]);
483 }
484
485 public static String getHPosCategoryStr(int alignOrIndent) {
486 int[] elements = Trainer.triple(alignOrIndent);

Callers 4

getPredictionAnalysisMethod · 0.95
getTokenAnalysisMethod · 0.95
getExemplarDisplayMethod · 0.95
toStringMethod · 0.80

Calls 2

tripleMethod · 0.95
formatMethod · 0.45

Tested by

no test coverage detected