MCPcopy Create free account
hub / github.com/Hiro420/NikkeTools / decompile

Method decompile

UnLuac/src/unluac/Main.java:148–173  ·  view source on GitHub ↗
(String in, String out, Configuration config)

Source from the content-addressed store, hash-verified

146 }
147
148 public static void decompile(String in, String out, Configuration config) throws IOException {
149 LFunction lmain = file_to_function(in, config);
150 Decompiler d = new Decompiler(lmain);
151 Decompiler.State result = d.decompile();
152 final PrintStream pout = new PrintStream(out);
153 d.print(result, new Output(new OutputProvider() {
154
155 @Override
156 public void print(String s) {
157 pout.print(s);
158 }
159
160 @Override
161 public void print(byte b) {
162 pout.write(b);
163 }
164
165 @Override
166 public void println() {
167 pout.println();
168 }
169
170 }));
171 pout.flush();
172 pout.close();
173 }
174
175 public static void assemble(String in, String out) throws IOException, AssemblerException {
176 OutputStream outstream = new BufferedOutputStream(new FileOutputStream(new File(out)));

Callers 2

runMethod · 0.95
mainMethod · 0.45

Calls 3

file_to_functionMethod · 0.95
decompileMethod · 0.95
printMethod · 0.95

Tested by 1

runMethod · 0.76