-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathync.c
More file actions
29 lines (25 loc) · 803 Bytes
/
ync.c
File metadata and controls
29 lines (25 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>
#include <string.h>
#include "compiler.h"
#define YN_VERSION "1.0.1"
// ==========================================
// Application Entry Point
// ==========================================
int main(int argc, char** argv) {
if (argc >= 2) {
if (strcmp(argv[1], "-v") == 0 || strcmp(argv[1], "--version") == 0) {
printf("YN Language Compiler (ync) v%s - OOP Native Engine\n", YN_VERSION);
return 0;
}
}
if (argc < 2) {
printf("YN Language Compiler (ync) v%s - OOP Native Engine\n", YN_VERSION);
printf("Usage: yn <script.yn>\n");
printf(" yn --version\n");
return 1;
}
Compiler* comp = create_compiler(argv[1]);
comp->compile(comp);
destroy_compiler(comp);
return 0;
}