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

Method exec

output/java8/1.4.14/Interpreter.java:147–165  ·  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

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