-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp.js
More file actions
23 lines (19 loc) · 656 Bytes
/
Copy pathapp.js
File metadata and controls
23 lines (19 loc) · 656 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const GBD = require('./src/components/GBD');
const ConfigHandler = require('./src/components/ConfigHandler');
const { initCliOptions } = require('./src/helpers/CliOptionsHelper');
const { runNearleyc } = require('./src/helpers/ProcessHelper');
// Entry point of the application
const app = () => {
// initialize command line options
const argv = initCliOptions();
// initialize user config
new ConfigHandler().init('config.json');
// if compilation flag is set, compile the grammar and stop script execution
if (argv.compile) {
runNearleyc();
return;
}
const gbd = new GBD(argv);
gbd.run();
}
app();