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

Method getTemplateRange

output/java/1.4.12/CompiledST.java:214–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212 }
213
214 public Interval getTemplateRange() {
215 if ( isAnonSubtemplate ) {
216 int start = Integer.MAX_VALUE;
217 int stop = Integer.MIN_VALUE;
218 for (Interval interval : sourceMap) {
219 if ( interval==null ) {
220 continue;
221 }
222 start = Math.min(start, interval.a);
223 stop = Math.max(stop, interval.b);
224 }
225 if ( start<= stop+1 ) {
226 return new Interval(start, stop);
227 }
228 }
229 return new Interval(0, template.length()-1);
230 }
231
232 public String instrs() {
233 BytecodeDisassembler dis = new BytecodeDisassembler(this);

Callers 2

getTemplateSourceMethod · 0.95
updateCurrentSTMethod · 0.45

Calls 3

minMethod · 0.45
maxMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected