-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"files.associations": { | ||
"*.cjson": "jsonc", | ||
"*.wxss": "css", | ||
"*.wxs": "javascript", | ||
"utf8.h": "c" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#### Dependancies | ||
utf8.h - https://github.com/sheredom/utf8.h | ||
raylib - https://github.com/raysan5/raylib |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@REM mkdir if not exist .\build | ||
if not exist .\build mkdir .\build | ||
gcc -o .\build\main.o -c .\src\main.c | ||
|
||
if not exist .\bin mkdir .\bin | ||
gcc -o .\bin\lingc.exe .\build\main.o .\lib\win_64\raylib.dll | ||
|
||
copy .\lib\win_64\raylib.dll .\bin\raylib.dll | ||
|
||
@echo Build Done! |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@echo off | ||
@REM delete if exist .\bin | ||
if exist .\bin rmdir /s /q .\bin | ||
@REM delete if exist .\build | ||
if exist .\build rmdir /s /q .\build | ||
|
||
call build.bat | ||
@echo on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
call build.bat | ||
.\bin\lingc.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "import.h" | ||
#include "E_Function.h" | ||
|
||
typedef struct { | ||
int id; | ||
int index; | ||
string name; | ||
string returns[RULE_FUNCTION_RETURN_MAX]; | ||
byte returns_count; | ||
string params[RULE_FUNCTION_PARAM_MAX]; | ||
byte params_count; | ||
} E_Function; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef E_FUNCTION_H__ | ||
#define E_FUNCTION_H__ | ||
|
||
typedef struct E_Function E_Function; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "import.h" | ||
#include "E_StaticVar.h" | ||
|
||
typedef struct { | ||
int id; | ||
int index; | ||
string name; | ||
string value; | ||
} E_StaticVar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef E_STATICVAR_H__ | ||
#define E_STATICVAR_H__ | ||
|
||
typedef struct E_StaticVar E_StaticVar; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef ENTITIES_SOURCE_EXPORT_H__ | ||
#define ENTITIES_SOURCE_EXPORT_H__ | ||
|
||
#include "E_StaticVar.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef ENTITIES_SOURCE_IMPORT_H__ | ||
#define ENTITIES_SOURCE_IMPORT_H__ | ||
|
||
#include "../Generic.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef GENERIC_H__ | ||
#define GENERIC_H__ | ||
|
||
#include <utf8.h> | ||
|
||
#ifndef bool | ||
#define bool unsigned char | ||
#define true 1 | ||
#define false 0 | ||
#endif | ||
|
||
#define PLogNA(x) printf("%s:%d %s", __FILE__, __LINE__, x) | ||
#define PLog(x, ...) printf("%s:%d ", __FILE__, __LINE__); printf(x, __VA_ARGS__) | ||
|
||
#define string utf8_int8_t * | ||
#define byte unsigned char | ||
|
||
// ==== Rule ==== | ||
const int RULE_FUNCTION_RETURN_MAX = 8; | ||
const int RULE_FUNCTION_PARAM_MAX = 32; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef RP_SOURCE_H__ | ||
#define RP_SOURCE_H__ | ||
|
||
typedef struct RP_Source RP_Source; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <raylib.h> | ||
#include <stdio.h> | ||
#include "Generic.h" | ||
|
||
int main(int argc, char **argv) { | ||
string str = "Hello, world!%d\n"; | ||
PLog(str,4); | ||
#if DEBUG_DRAW | ||
InitWindow(800, 600, "Hello, world!"); | ||
while (!WindowShouldClose()) { | ||
BeginDrawing(); | ||
ClearBackground(RAYWHITE); | ||
EndDrawing(); | ||
} | ||
CloseWindow(); | ||
#endif | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import io; | ||
|
||
public struct ST { | ||
|
||
public i8 a; | ||
motheronly i16 b; | ||
external i32 c; | ||
internal bool d; | ||
|
||
public fn void Log() { | ||
Console.Log(a.ToString()); | ||
} | ||
|
||
} | ||
|
||
public fn i32 Main() { | ||
Console.Log("Hello World!"); | ||
return 0; | ||
} | ||
|
||
fn i32, i32 Out(i32 a, i32 b) { | ||
return a, b; | ||
} |