Added trivial standard library and search paths.

This commit is contained in:
Nathan Braswell
2014-05-01 01:18:01 -04:00
parent 1997ba49d2
commit 6a75832b59
6 changed files with 60 additions and 5 deletions

30
stdlib/io.krak Normal file
View File

@@ -0,0 +1,30 @@
__if_comp__ __C__ __simple_passthrough__ """
#include <stdio.h>
"""
void print(char* toPrint) {
__if_comp__ __C__ {
__simple_passthrough__ """
printf(toPrint);
"""
}
return;
}
void print(int toPrint) {
__if_comp__ __C__ {
__simple_passthrough__ """
printf("%d", toPrint);
"""
}
return;
}
void print(float toPrint) {
__if_comp__ __C__ {
__simple_passthrough__ """
printf("%f", toPrint);
"""
}
return;
}