MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / main

Method main

src/main/java/wyc/Executor.java:151–172  ·  view source on GitHub ↗
(String[] _args)

Source from the content-addressed store, hash-verified

149 };
150 //
151 public static void main(String[] _args) throws IOException {
152 List<String> args = new ArrayList<>(Arrays.asList(_args));
153 Map<String, Object> options = OptArg.parseOptions(args, OPTIONS);
154 // Extract config options
155 File wyildir = (File) options.get("wyildir");
156 Trie target = Trie.fromString((String) options.get("output"));
157 ArrayList<File> whileypath = (ArrayList<File>) options.get("whileypath");
158 // Construct Main object
159 Executor main = new Executor().setTarget(target).setWyilDir(wyildir).setWhileyPath(whileypath);
160 // Default signature
161 Type.Method sig = new Type.Method(Type.Void, Type.Void);
162 //
163 boolean result = true;
164 for (String arg : args) {
165 // Determine qualitifed name of method to invoke.
166 result &= main.run(QualifiedName.fromString(arg), sig);
167 }
168 // Compile Whiley source file(s).
169
170 // Produce exit code
171 System.exit(result ? 0 : 1);
172 }
173}

Callers

nothing calls this directly

Calls 8

parseOptionsMethod · 0.95
fromStringMethod · 0.95
runMethod · 0.95
fromStringMethod · 0.95
getMethod · 0.65
setWhileyPathMethod · 0.45
setWyilDirMethod · 0.45
setTargetMethod · 0.45

Tested by

no test coverage detected