Added indirection to types in prep for function calls, full passthrough, and the first real hello world

This commit is contained in:
Nathan Braswell
2016-01-10 18:26:31 -05:00
parent 7f20a42178
commit 5db0365a63
7 changed files with 82 additions and 45 deletions

View File

@@ -109,6 +109,8 @@ obj string (Object, Serializable) {
return *this == str
}
fun operator+(integer: int): string return *this + to_string(integer);
fun operator+(str: *char): string {
var newStr.construct(str):string
var ret.construct(data + newStr.data):string
@@ -121,6 +123,8 @@ obj string (Object, Serializable) {
return ret
}
fun operator+=(integer: int) *this += to_string(integer);
fun operator+=(character: char): void {
data += character
}