MCPcopy
hub / github.com/antlr/antlr4 / write

Method write

tool/src/org/antlr/v4/codegen/CodeGenerator.java:171–186  ·  view source on GitHub ↗
(ST code, String fileName)

Source from the content-addressed store, hash-verified

169 }
170
171 public void write(ST code, String fileName) {
172 try {
173// long start = System.currentTimeMillis();
174 Writer w = tool.getOutputFileWriter(g, fileName);
175 STWriter wr = new AutoIndentWriter(w);
176 wr.setLineWidth(lineWidth);
177 code.write(wr);
178 w.close();
179// long stop = System.currentTimeMillis();
180 }
181 catch (IOException ioe) {
182 tool.errMgr.toolError(ErrorType.CANNOT_WRITE_FILE,
183 ioe,
184 fileName);
185 }
186 }
187
188 public String getRecognizerFileName() { return getRecognizerFileName(false); }
189 public String getListenerFileName() { return getListenerFileName(false); }

Calls 3

toolErrorMethod · 0.80
getOutputFileWriterMethod · 0.45
closeMethod · 0.45