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

Method exec

output/java/1.4.19/Interpreter.java:153–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

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