Add meta header and implementation for version printing

This commit is contained in:
Kyler Olsen 2025-11-28 21:27:39 -07:00
parent 382842540a
commit d333cdfad5
5 changed files with 16 additions and 8 deletions

View File

@ -7,15 +7,10 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include "sls/main.h" #include "sls/meta.h"
#include "sls/bool.h" #include "sls/bool.h"
#include "sls/repl.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[]) { int main(int argc, char *argv[]) {
Boolean version = FALSE; Boolean version = FALSE;
Boolean file = FALSE; Boolean file = FALSE;

13
SLS_C/src/meta.c Normal file
View File

@ -0,0 +1,13 @@
// Kyler Olsen
// YREA SLS
// MEta File
// November 2025
#include <stdio.h>
#include "sls/meta.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);
}

View File

@ -8,7 +8,7 @@
#include <string.h> #include <string.h>
#include "sls/repl.h" #include "sls/repl.h"
#include "sls/main.h" #include "sls/meta.h"
#include "sls/errors.h" #include "sls/errors.h"
#include "sls/lexer.h" #include "sls/lexer.h"
#include "sls/string.h" #include "sls/string.h"

View File

@ -10,7 +10,7 @@
#include "sls/errors.h" #include "sls/errors.h"
#include "tests/tests.h" #include "tests/tests.h"
static const Boolean PRINT_SUCCESSFUL_TESTS = TRUE; static const Boolean PRINT_SUCCESSFUL_TESTS = FALSE;
const SlsStr TEST_FILE_NAME = SLS_STR_CONST("TEST_FILE.SLS"); const SlsStr TEST_FILE_NAME = SLS_STR_CONST("TEST_FILE.SLS");