Added support for destructors! This is done by making a void, parameterless member method called destruct which is called when a stack object falls out of scope, if it exists. This is implemented by the generator, in this case CGenerator.

This commit is contained in:
Nathan Braswell
2014-06-28 08:31:33 -07:00
parent 63d9ec66e1
commit 12f57f8ce8
6 changed files with 58 additions and 5 deletions

View File

@@ -0,0 +1,9 @@
import io;
void nothing() {}
int main() {
nothing();
println("It was nothing");
return 0;
}