Logo
Explore Help
Sign In
miloignis/kraken
1
0
Fork 0
You've already forked kraken
Code Issues Pull Requests Packages Projects Releases Wiki Activity
Files
b621107c8efcc5f77ab7b7e7a9e9c4175ab02768
kraken/tests/test_typeExpr.krak

21 lines
365 B
Plaintext
Raw Normal View History

Declarations are now written |type| identifier;, generally. Functions are similar |void| func() {}, etc. Special declarations still work, etc
2014-08-01 00:45:48 -07:00
import io;
typedef ClassWithConstructor {
|int| data;
|ClassWithConstructor*| construct(|int| inData) {
data = inData;
return this;
}
|void| printData() {
Got the new scoping working! Still some odd stuff happening to certian templates, and I think vector is having problems with new/traits. Really need to get canonnical filenames and what not worked out
2014-12-30 01:22:09 -05:00
io::println(data);
Declarations are now written |type| identifier;, generally. Functions are similar |void| func() {}, etc. Special declarations still work, etc
2014-08-01 00:45:48 -07:00
}
};
|int| main() {
|ClassWithConstructor| object.construct(4);
object.printData();
|int| a = 8;
Got the new scoping working! Still some odd stuff happening to certian templates, and I think vector is having problems with new/traits. Really need to get canonnical filenames and what not worked out
2014-12-30 01:22:09 -05:00
io::println(a);
Declarations are now written |type| identifier;, generally. Functions are similar |void| func() {}, etc. Special declarations still work, etc
2014-08-01 00:45:48 -07:00
return 0;
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 110ms Template: 12ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API