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

Method exec

output/java/1.4.13/Interpreter.java:156–171  ·  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

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