1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
|