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

Method exec

output/java8/1.4.15/Interpreter.java:151–169  ·  view source on GitHub ↗

Execute template self and return how many characters it wrote to out. @return the number of characters written to out

(STWriter out, InstanceScope scope)

Source from the content-addressed store, hash-verified

149 */
150
151 public int exec(STWriter out, InstanceScope scope) {
152 final ST self = scope.st;
153 if ( trace ) System.out.println("exec("+self.getName()+")");
154 try {
155 setDefaultArguments(out, scope);
156 return _exec(out, scope);
157 }
158 catch (Exception e) {
159 StringWriter sw = new StringWriter();
160 PrintWriter pw = new PrintWriter(sw);
161 e.printStackTrace(pw);
162 pw.flush();
163 errMgr.runTimeError(this,
164 scope,
165 ErrorType.INTERNAL_ERROR,
166 "internal error: "+sw.toString());
167 return 0;
168 }
169 }
170
171 protected int _exec(STWriter out, InstanceScope scope) {
172 final ST self = scope.st;

Callers 4

writeMethod · 0.95
inspectMethod · 0.95
getEventsMethod · 0.95
writeObjectMethod · 0.95

Calls 6

getNameMethod · 0.95
setDefaultArgumentsMethod · 0.95
_execMethod · 0.95
runTimeErrorMethod · 0.65
toStringMethod · 0.65
flushMethod · 0.45

Tested by

no test coverage detected