File naming convention change
This commit is contained in:
@@ -13,8 +13,8 @@ The language is currently **very debuggable**. It can produce readable C code wi
|
|||||||
// Virtual memory abstraction using Windows API
|
// Virtual memory abstraction using Windows API
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "kernel32.kl"
|
#import "KERNEL32.core"
|
||||||
#import "base.kl"
|
#import "Base.core"
|
||||||
|
|
||||||
PAGE_SIZE :: 4096
|
PAGE_SIZE :: 4096
|
||||||
Memory :: struct
|
Memory :: struct
|
||||||
|
|||||||
@@ -832,7 +832,7 @@ typedef struct String{
|
|||||||
compiler_error(0, "Entry point is not defined! Try main or WinMain");
|
compiler_error(0, "Entry point is not defined! Try main or WinMain");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate language.kl
|
// Generate language.core
|
||||||
for(S32 i = 0; i < pctx->base_language_ordered_decl_len; i++){
|
for(S32 i = 0; i < pctx->base_language_ordered_decl_len; i++){
|
||||||
Ast_Decl *it = get(&pctx->ordered_decls, i);
|
Ast_Decl *it = get(&pctx->ordered_decls, i);
|
||||||
genln("");
|
genln("");
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ compile_file_to_string(String filename){
|
|||||||
total_time = os_time();
|
total_time = os_time();
|
||||||
begin_compilation();
|
begin_compilation();
|
||||||
{
|
{
|
||||||
Ast_Module *module = add_module(0, pctx->intern("language.kl"_s));
|
Ast_Module *module = add_module(0, pctx->intern("Language.core"_s));
|
||||||
insert_builtin_types_into_scope(module);
|
insert_builtin_types_into_scope(module);
|
||||||
pctx->language_base_module = module;
|
pctx->language_base_module = module;
|
||||||
|
|
||||||
|
|||||||
@@ -285,7 +285,6 @@ int main(int argument_count, char **arguments){
|
|||||||
else {
|
else {
|
||||||
Scratch scratch;
|
Scratch scratch;
|
||||||
Array<OS_File_Info> examples = os_list_dir(scratch, "examples"_s);
|
Array<OS_File_Info> examples = os_list_dir(scratch, "examples"_s);
|
||||||
// compile_file("examples/language_basics.kl"_s, COMPILE_AND_RUN);
|
|
||||||
For(examples){
|
For(examples){
|
||||||
if(it.is_directory) continue;
|
if(it.is_directory) continue;
|
||||||
compile_file(it.absolute_path, COMPILE_AND_RUN | COMPILE_TESTING);
|
compile_file(it.absolute_path, COMPILE_AND_RUN | COMPILE_TESTING);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#import "base.kl"
|
#import "Base.core"
|
||||||
#import "arena.kl"
|
#import "Arena.core"
|
||||||
#import "os_windows.kl"
|
#import "Windows.core"
|
||||||
#import "kernel32.kl"
|
#import "KERNEL32.core"
|
||||||
#import "gdi32.kl"
|
#import "GDI32.core"
|
||||||
#import "user32.kl"
|
#import "USER32.core"
|
||||||
#import "winmm.kl"
|
#import "WINMM.core"
|
||||||
|
|
||||||
Vec2I :: struct;; x: S64; y: S64
|
Vec2I :: struct;; x: S64; y: S64
|
||||||
Vec2 :: struct;; x: F32; y: F32
|
Vec2 :: struct;; x: F32; y: F32
|
||||||
@@ -19,11 +19,4 @@ main :: (): int
|
|||||||
e := c - d
|
e := c - d
|
||||||
Assert(e.x == 6 && e.y == 8 && e.z == 10)
|
Assert(e.x == 6 && e.y == 8 && e.z == 10)
|
||||||
|
|
||||||
test_string := "
|
|
||||||
|
|
||||||
Memes
|
|
||||||
|
|
||||||
|
|
||||||
"
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#import "math.kl"
|
#import "Math.core"
|
||||||
|
|
||||||
Epsilon :: 0.00001
|
Epsilon :: 0.00001
|
||||||
Screen : *U32
|
Screen : *U32
|
||||||
@@ -90,13 +90,13 @@ Raymarcher_Update :: ()
|
|||||||
// Windows specific code
|
// Windows specific code
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "base.kl"
|
#import "Base.core"
|
||||||
#import "arena.kl"
|
#import "Arena.core"
|
||||||
#import "os_windows.kl"
|
#import "Windows.core"
|
||||||
#import "kernel32.kl"
|
#import "KERNEL32.core"
|
||||||
#import "gdi32.kl"
|
#import "GDI32.core"
|
||||||
#import "user32.kl"
|
#import "USER32.core"
|
||||||
#import "winmm.kl"
|
#import "WINMM.core"
|
||||||
|
|
||||||
Windows_Bitmap :: struct
|
Windows_Bitmap :: struct
|
||||||
size: Vec2I
|
size: Vec2I
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
OS :: #import "os_windows.kl"
|
OS :: #import "Windows.core"
|
||||||
Base :: #import "base.kl"
|
Base :: #import "Base.core"
|
||||||
ArenaDI: U64
|
ArenaDI: U64
|
||||||
|
|
||||||
ADDITIONAL_COMMIT_SIZE :: 1024*1024
|
ADDITIONAL_COMMIT_SIZE :: 1024*1024
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
OS :: #import "os_windows.kl"
|
OS :: #import "Windows.core"
|
||||||
#import "arena.kl"
|
#import "Arena.core"
|
||||||
SizeU :: U64
|
SizeU :: U64
|
||||||
|
|
||||||
ClampTopSizeU :: (val: SizeU, max: SizeU): SizeU
|
ClampTopSizeU :: (val: SizeU, max: SizeU): SizeU
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#import "kernel32.kl"
|
#import "KERNEL32.core"
|
||||||
RBGQUAD :: struct;; rgbBlue: BYTE; rgbGreen: BYTE; rgbRed: BYTE; rgbReserved: BYTE
|
RBGQUAD :: struct;; rgbBlue: BYTE; rgbGreen: BYTE; rgbRed: BYTE; rgbReserved: BYTE
|
||||||
BITMAPINFOHEADER :: struct;; biSize: DWORD; biWidth: LONG; biHeight: LONG; biPlanes: WORD; biBitCount: WORD; biCompression: DWORD; biSizeImage: DWORD; biXPelsPerMeter: LONG; biYPelsPerMeter: LONG; biClrUsed: DWORD; biClrImportant: DWORD
|
BITMAPINFOHEADER :: struct;; biSize: DWORD; biWidth: LONG; biHeight: LONG; biPlanes: WORD; biBitCount: WORD; biCompression: DWORD; biSizeImage: DWORD; biXPelsPerMeter: LONG; biYPelsPerMeter: LONG; biClrUsed: DWORD; biClrImportant: DWORD
|
||||||
BITMAPINFO :: struct;; bmiHeader: BITMAPINFOHEADER; bmiColors: [1]RBGQUAD
|
BITMAPINFO :: struct;; bmiHeader: BITMAPINFOHEADER; bmiColors: [1]RBGQUAD
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#import "kernel32.kl"
|
#import "KERNEL32.core"
|
||||||
WNDPROC :: (hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM): LRESULT
|
WNDPROC :: (hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM): LRESULT
|
||||||
WNDCLASSW :: struct;; style: UINT; lpfnWndProc: WNDPROC; cbClsExtra: int; cbWndExtra: int; hInstance: HINSTANCE; hIcon: HICON; hCursor: HCURSOR; hbrBackground: HBRUSH; lpszMenuName: LPCWSTR; lpszClassName: LPCWSTR
|
WNDCLASSW :: struct;; style: UINT; lpfnWndProc: WNDPROC; cbClsExtra: int; cbWndExtra: int; hInstance: HINSTANCE; hIcon: HICON; hCursor: HCURSOR; hbrBackground: HBRUSH; lpszMenuName: LPCWSTR; lpszClassName: LPCWSTR
|
||||||
MSG :: struct;; hwnd: HWND; message: UINT; wParam: WPARAM; lParam: LPARAM; time: DWORD; pt: POINT; lPrivate: DWORD
|
MSG :: struct;; hwnd: HWND; message: UINT; wParam: WPARAM; lParam: LPARAM; time: DWORD; pt: POINT; lPrivate: DWORD
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#import "kernel32.kl"
|
#import "KERNEL32.core"
|
||||||
|
|
||||||
MMRESULT :: UINT
|
MMRESULT :: UINT
|
||||||
TIMERR_NOERROR :: 0
|
TIMERR_NOERROR :: 0
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#import "kernel32.kl"
|
#import "KERNEL32.core"
|
||||||
#import "base.kl"
|
#import "Base.core"
|
||||||
|
|
||||||
PAGE_SIZE :: 4096
|
PAGE_SIZE :: 4096
|
||||||
Memory :: struct
|
Memory :: struct
|
||||||
Reference in New Issue
Block a user