aboutsummaryrefslogtreecommitdiff
path: root/src/inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc')
-rw-r--r--src/inc/context.h23
-rw-r--r--src/inc/lib.h33
-rw-r--r--src/inc/lint.h8
-rw-r--r--src/inc/log.h9
-rw-r--r--src/inc/preprocess.h8
-rw-r--r--src/inc/tokenize.h35
6 files changed, 0 insertions, 116 deletions
diff --git a/src/inc/context.h b/src/inc/context.h
deleted file mode 100644
index 603f42e..0000000
--- a/src/inc/context.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef CONTEXT_H
-#define CONTEXT_H
-
-#include <lib.h>
-
-struct ctx {
- size_t line;
- size_t column;
- const char *path;
-
- char *raw;
- char *data;
- size_t size;
-
- size_t token_count;
- struct token *tokens;
-};
-
-struct ctx *context_create(const char *path);
-void context_destroy(struct ctx *ctx);
-void context_rewind(struct ctx *ctx);
-
-#endif
diff --git a/src/inc/lib.h b/src/inc/lib.h
deleted file mode 100644
index 0402990..0000000
--- a/src/inc/lib.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef LIB_H
-#define LIB_H
-
-// Compatibility imports (mainly for Melvix)
-
-#ifdef __melvix__
-
-#include <arg.h>
-#include <assert.h>
-#include <def.h>
-#include <mem.h>
-#include <print.h>
-#include <str.h>
-#include <sys.h>
-typedef size_t u32;
-
-#elif defined(__linux__) || defined(unix) || defined(__unix__) || defined(__unix) || \
- defined(__APPLE__) || defined(__FreeBSD)
-
-#include <assert.h>
-#include <ctype.h>
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/param.h>
-
-#else
-#error "Unknown operating system"
-#endif
-
-#endif
diff --git a/src/inc/lint.h b/src/inc/lint.h
deleted file mode 100644
index 9c3f808..0000000
--- a/src/inc/lint.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef LINT_H
-#define LINT_H
-
-#include <context.h>
-
-void lint(struct ctx *ctx);
-
-#endif
diff --git a/src/inc/log.h b/src/inc/log.h
deleted file mode 100644
index 4698f9c..0000000
--- a/src/inc/log.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef LOG_H
-#define LOG_H
-
-#include <context.h>
-
-__attribute__((noreturn)) void errln(struct ctx *ctx, const char *fmt, ...);
-__attribute__((noreturn)) void err(const char *fmt, ...);
-
-#endif
diff --git a/src/inc/preprocess.h b/src/inc/preprocess.h
deleted file mode 100644
index e57af10..0000000
--- a/src/inc/preprocess.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef PREPROCESS_H
-#define PREPROCESS_H
-
-#include <context.h>
-
-void preprocess(struct ctx *ctx);
-
-#endif
diff --git a/src/inc/tokenize.h b/src/inc/tokenize.h
deleted file mode 100644
index 557da9c..0000000
--- a/src/inc/tokenize.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef TOKENIZE_H
-#define TOKENIZE_H
-
-#include <context.h>
-
-#define TOKENS_MAX 4096
-
-enum token_type {
- UNKNOWN,
-
- TYPE,
- TYPEDELIM,
- PARAM,
-
- IDENT,
- OPERATOR,
-
- LPAREN,
- RPAREN,
- EQUAL,
-
- NEWLINE,
- EOL,
- END,
-};
-
-struct token {
- enum token_type type;
- size_t start, end;
-};
-
-void tokens_print(struct ctx *ctx);
-void tokenize(struct ctx *ctx);
-
-#endif