From 93c6e4b0b5ef2df6afa1b70483b0bb0fedaacac0 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 8 May 2023 21:27:39 +0300 Subject: start documentation process --- include/ek/actualize.h | 8 ++++++++ include/ek/ast.h | 6 ++++++ include/ek/compiler.h | 6 ++++++ include/ek/debug.h | 6 ++++++ include/ek/imports.h | 8 ++++++++ include/ek/parser.h | 6 ++++++ include/ek/path.h | 6 ++++++ include/ek/scope.h | 6 ++++++ include/ek/string.h | 7 +++++++ 9 files changed, 59 insertions(+) (limited to 'include') 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 #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 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 #include 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 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 #include #include 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 #include #include -- cgit v1.3