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

Method exec

output/java/1.4.14/Interpreter.java:149–166  ·  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

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