aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-05-08 21:27:39 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-05-08 21:28:20 +0300
commit93c6e4b0b5ef2df6afa1b70483b0bb0fedaacac0 (patch)
tree8e7071f28a30d7a1e85282fd590f3a167e6e19b6 /include
parentf7767d853922610c57ccd429132ac7b4a1677de2 (diff)
downloadek-93c6e4b0b5ef2df6afa1b70483b0bb0fedaacac0.tar.gz
ek-93c6e4b0b5ef2df6afa1b70483b0bb0fedaacac0.zip
start documentation process
Diffstat (limited to 'include')
-rw-r--r--include/ek/actualize.h8
-rw-r--r--include/ek/ast.h6
-rw-r--r--include/ek/compiler.h6
-rw-r--r--include/ek/debug.h6
-rw-r--r--include/ek/imports.h8
-rw-r--r--include/ek/parser.h6
-rw-r--r--include/ek/path.h6
-rw-r--r--include/ek/scope.h6
-rw-r--r--include/ek/string.h7
9 files changed, 59 insertions, 0 deletions
diff --git a/include/ek/actualize.h b/include/ek/actualize.h
index f98df07..18755b1 100644
--- a/include/ek/actualize.h
+++ b/include/ek/actualize.h
@@ -4,6 +4,14 @@
#ifndef ANALYZE_H
#define ANALYZE_H
+/**
+ * @file actualize.h
+ *
+ * Actualization stuff, that is stuff needed for turning raw AST
+ * into processed AST that can be passed to a backend to generate
+ * code.
+ */
+
#include <assert.h>
#include "ast.h"
diff --git a/include/ek/ast.h b/include/ek/ast.h
index 3c55c1f..6d0f2b1 100644
--- a/include/ek/ast.h
+++ b/include/ek/ast.h
@@ -4,6 +4,12 @@
#ifndef AST_H
#define AST_H
+/**
+ * @file ast.h
+ *
+ * Abstract syntax tree handling.
+ */
+
enum ast_binops {
AST_ADD,
AST_SUB,
diff --git a/include/ek/compiler.h b/include/ek/compiler.h
index 21ac7a2..8e3d221 100644
--- a/include/ek/compiler.h
+++ b/include/ek/compiler.h
@@ -4,6 +4,12 @@
#ifndef EK_COMPILER_H
#define EK_COMPILER_H
+/**
+ * @file compiler.h
+ *
+ * Top level compiler.
+ */
+
#include <ek/scope.h>
int compile(const char *file);
diff --git a/include/ek/debug.h b/include/ek/debug.h
index a6e2f57..7dca003 100644
--- a/include/ek/debug.h
+++ b/include/ek/debug.h
@@ -4,6 +4,12 @@
#ifndef EK_DEBUG_H
#define EK_DEBUG_H
+/**
+ * @file debug.h
+ *
+ * Debugging and general information printing helpers.
+ */
+
#include <stdio.h>
#include <ek/ast.h>
diff --git a/include/ek/imports.h b/include/ek/imports.h
index c8fdfaf..801eb06 100644
--- a/include/ek/imports.h
+++ b/include/ek/imports.h
@@ -4,6 +4,14 @@
#ifndef EK_IMPORTS_H
#define EK_IMPORTS_H
+/**
+ * @file imports.h
+ *
+ * File import handling.
+ * Currently mostly unimplemented, but intended to keep track
+ * of which files have been imported.
+ */
+
#include <stdbool.h>
void add_import_path(const char *dir);
diff --git a/include/ek/parser.h b/include/ek/parser.h
index 75322b9..f0425a4 100644
--- a/include/ek/parser.h
+++ b/include/ek/parser.h
@@ -4,6 +4,12 @@
#ifndef PARSER_H
#define PARSER_H
+/**
+ * @file parser.h
+ *
+ * Glue file to get lexer and parser to play nice.
+ */
+
#include <stddef.h>
#include <stdbool.h>
#include <ek/ast.h>
diff --git a/include/ek/path.h b/include/ek/path.h
index 6e918a8..2ddfb4c 100644
--- a/include/ek/path.h
+++ b/include/ek/path.h
@@ -4,6 +4,12 @@
#ifndef EK_PATH
#define EK_PATH
+/**
+ * @file path.h
+ *
+ * Path handling helpers.
+ */
+
char *ek_basename(const char *file);
char *ek_dirname(const char *file);
char *ek_cwdname();
diff --git a/include/ek/scope.h b/include/ek/scope.h
index 5962014..56e5915 100644
--- a/include/ek/scope.h
+++ b/include/ek/scope.h
@@ -4,6 +4,12 @@
#ifndef SCOPE_H
#define SCOPE_H
+/**
+ * @file scope.h
+ *
+ * Scope handling stuff.
+ */
+
#include "ast.h"
#include "debug.h"
diff --git a/include/ek/string.h b/include/ek/string.h
index 7e93eb0..5c561a7 100644
--- a/include/ek/string.h
+++ b/include/ek/string.h
@@ -4,6 +4,13 @@
#ifndef EK_STRING_H
#define EK_STRING_H
+/**
+ * @file string.h
+ *
+ * String handling helper stuff.
+ * At the moment mostly unused.
+ */
+
#include <stddef.h>
#include <string.h>
#include <stdbool.h>