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

Method exec

output/java8/1.4.13/Interpreter.java:154–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

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