41 lines
852 B
C
41 lines
852 B
C
// Kyler Olsen
|
|
// YREA SLS
|
|
// Main File
|
|
// October 2025
|
|
|
|
#include <stdio.h>
|
|
#include <stddef.h>
|
|
#include <string.h>
|
|
|
|
#include "sls/main.h"
|
|
#include "sls/bool.h"
|
|
#include "sls/repl.h"
|
|
|
|
void print_version() {
|
|
printf("YREA SLS (" SLS_NAME ") " SLS_VER " (" GIT_COMMIT_HASH ")\n");
|
|
printf("Compiled with " COMPILER_NAME " %d at " __DATE__ " " __TIME__ "\n", COMPILER_VER);
|
|
}
|
|
|
|
int main(int argc, char *argv[]) {
|
|
Boolean version = FALSE;
|
|
Boolean file = FALSE;
|
|
char *filename = NULL;
|
|
|
|
(void)file;
|
|
(void)filename;
|
|
|
|
for (int i = 0; i < argc; i++) {
|
|
if (strcmp(argv[i], "--version") == 0) version = TRUE;
|
|
if (strcmp(argv[i], "-v") == 0) version = TRUE;
|
|
}
|
|
|
|
if (version) {
|
|
print_version();
|
|
return 0;
|
|
} else if (file) {
|
|
return 1;
|
|
} else {
|
|
return repl(0, NULL);
|
|
}
|
|
}
|