Declarations are now written |type| identifier;, generally. Functions are similar |void| func() {}, etc. Special declarations still work, etc

This commit is contained in:
Nathan Braswell
2014-08-01 00:45:48 -07:00
parent 4cf8dbbd5b
commit 5b57770774
31 changed files with 199 additions and 175 deletions

View File

@@ -2,9 +2,9 @@ import io;
typedef template <T,J> TemplateTest {
T a;
J b;
void print() {
|T| a;
|J| b;
|void| print() {
print("a: ");
print(a);
print("\n");
@@ -14,10 +14,10 @@ typedef template <T,J> TemplateTest {
}
};
int main() {
|int| main() {
TemplateTest<int, char*> test;
TemplateTest<char*, char*> test2;
|TemplateTest<int, char*>| test;
|TemplateTest<char*, char*>| test2;
test.a = 24;
test.b = "Hello World";
test2.a = "Pi incoming";