Renamed errors.h and separated bool.h
This commit is contained in:
parent
329a71ca24
commit
40007c27a6
|
|
@ -0,0 +1,14 @@
|
||||||
|
// Kyler Olsen
|
||||||
|
// YREA SLS
|
||||||
|
// SLS Boolean Header
|
||||||
|
// November 2025
|
||||||
|
|
||||||
|
#ifndef SLS_BOOLEAN_H
|
||||||
|
#define SLS_BOOLEAN_H
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FALSE,
|
||||||
|
TRUE,
|
||||||
|
} Boolean;
|
||||||
|
|
||||||
|
#endif // SLS_BOOLEAN_H
|
||||||
|
|
@ -7,11 +7,7 @@
|
||||||
#define SLS_ERROR_H
|
#define SLS_ERROR_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
typedef enum {
|
|
||||||
FALSE,
|
|
||||||
TRUE,
|
|
||||||
} Boolean;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *message;
|
const char *message;
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "sls/sls_errors.h"
|
#include "sls/bool.h"
|
||||||
|
#include "sls/errors.h"
|
||||||
|
|
||||||
extern const size_t TYPE_NAMES_SAFE_LENGTH;
|
extern const size_t TYPE_NAMES_SAFE_LENGTH;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include "bool.h"
|
||||||
|
|
||||||
int isascii(unsigned char c);
|
int isascii(unsigned char c);
|
||||||
size_t strnlen(const char *s, size_t maxlen);
|
size_t strnlen(const char *s, size_t maxlen);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "sls/sls_errors.h"
|
#include "sls/errors.h"
|
||||||
|
#include "sls/bool.h"
|
||||||
#include "sls/lexer.h"
|
#include "sls/lexer.h"
|
||||||
#include "sls/string.h"
|
#include "sls/string.h"
|
||||||
#include "tests/lexer_test_helpers.h"
|
#include "tests/lexer_test_helpers.h"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "sls/sls_errors.h"
|
#include "sls/errors.h"
|
||||||
|
|
||||||
extern const char *TEST_FILE_NAME;
|
extern const char *TEST_FILE_NAME;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "sls/sls_errors.h"
|
#include "sls/errors.h"
|
||||||
|
#include "sls/bool.h"
|
||||||
#include "sls/lexer.h"
|
#include "sls/lexer.h"
|
||||||
#include "sls/string.h"
|
#include "sls/string.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
// November 2025
|
// November 2025
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
int isascii(unsigned char c) {
|
int isascii(unsigned char c) {
|
||||||
return c < 128;
|
return c < 128;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "sls/sls_errors.h"
|
#include "sls/errors.h"
|
||||||
|
#include "sls/bool.h"
|
||||||
#include "sls/lexer.h"
|
#include "sls/lexer.h"
|
||||||
#include "sls/string.h"
|
#include "sls/string.h"
|
||||||
#include "tests/lexer_test_helpers.h"
|
#include "tests/lexer_test_helpers.h"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "sls/sls_errors.h"
|
#include "sls/errors.h"
|
||||||
#include "sls/lexer.h"
|
#include "sls/lexer.h"
|
||||||
#include "sls/string.h"
|
#include "sls/string.h"
|
||||||
#include "tests/lexer_test_helpers.h"
|
#include "tests/lexer_test_helpers.h"
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "sls/errors.h"
|
||||||
#include "tests/tests.h"
|
#include "tests/tests.h"
|
||||||
|
|
||||||
const char *TEST_FILE_NAME = "TEST_FILE.SLS";
|
const char *TEST_FILE_NAME = "TEST_FILE.SLS";
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ file_headers = """\
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "sls/sls_errors.h"
|
#include "sls/errors.h"
|
||||||
#include "sls/lexer.h"
|
#include "sls/lexer.h"
|
||||||
#include "sls/string.h"
|
#include "sls/string.h"
|
||||||
#include "tests/lexer_test_helpers.h"
|
#include "tests/lexer_test_helpers.h"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue