summaryrefslogtreecommitdiff
path: root/rbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'rbc.c')
-rw-r--r--rbc.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/rbc.c b/rbc.c
new file mode 100644
index 0000000..15740ec
--- /dev/null
+++ b/rbc.c
@@ -0,0 +1,59 @@
+#ifndef CRBC
+#define CRBC
+/* CReborn - The first "official" C implementation of the Reborn programming language
+ * based on the Reborn Standard (reborn-lang.github.io/documents/standard)
+ * The name CReborn (C/Reborn, CREBORN or whatever) has been chosen because
+ * this implementation works by using C as its IR, or in much simpler terms,
+ * this compiler works by compiling Reborn code to C, and then using the
+ * GNU C Compiler (GNU Compiler Collection, gcc) to compile the output C program
+ * to an executable. This decision was made to simplify
+ *================================================================================================*
+ *#* Development currently lead by: [check README.md]
+ *================================================================================================*
+ *#* STYLE GUIDELINES FOR CODE CONTRIBUTORS (AND MAINTAINERS):
+ * - Use camelCase for variables.
+ * - Use PascalCase for functions.
+ * - 4 spaces indentation (not tabs but spaces.)
+ * - Don't exceed 100 characters on a single line unless you *really* must, it's mostly
+ * for readability since we think that it is better for code to extend vertically, rather
+ * than horizontally. (Also given some developers might use 3:2 or other less-wide formats.)
+ *================================================================================================*
+ *#* NOTES FOR VIM USERS
+ * - For Vim users that don't know how to set a limit to the coloumn size, you just:
+ * :set textwidth=100
+ * :set formatoptions+=t
+ * You can also obviously also set this in your .vimrc.
+ *
+ * - For Vim users that want to (a)llow the local .exrc for commodity, you can just do:
+ * :set exrc secure
+ * and reopen any file in the repo, then you will be asked to (a)llow, meaning to trust this
+ * repo's .exrc, after (a)llowing it you will already have the 4 spaces indentation, the 100
+ * characters limit (textwidth limit) and the format options set automatically. This only applies
+ * when editing files from this repo, but if you want them in your global .vimrc or neovim config
+ * you can also copy them, again, from the local .exrc file.
+ *
+ * - Note: If you use vim/nvim and you loaded (allowed) the .exrc from this repo you can also use
+ * these commands that will automatically compile for either release / normal mode testing or for
+ * debugging mode.
+ *
+ * :Cn / :Compn - Compiles with 'Normal compile'
+ * :Cd / :Compd - Compiles with 'Debug compile'
+ *
+ *#* COMPILE COMMANDS
+ * Normal compile = 'cc rbc.c -o crbc -O2 -Wall -Wextra -pedantic'
+ * Debug compile = 'cc rbc.c -o crbc -g -O0 -Wall -Wextra -pedantic -fsanitize=address,undefined'
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+// git@github.com:jstmaxlol/kat
+#include "kat.h"
+
+int main(/*int argc, char **argv*/) {
+ printf(":> [work-in-progress]\n");
+ return 0;
+}
+
+#endif