type-section-rework #6

Merged
sashakoshka merged 46 commits from type-section-rework into main 2022-09-17 10:36:27 -06:00
3 changed files with 102 additions and 30 deletions
Showing only changes of commit 319b60bfcd - Show all commits

View File

@ -12,25 +12,55 @@ data ro cIntegerPointer:{Int}
data ro dMutIntegerPointer:{Int}:mut data ro dMutIntegerPointer:{Int}:mut
data ro eIntegerArray16:Int:16 data ro eIntegerArray16:Int:16
data ro fIntegerArrayVariable:{Int ..} data ro fIntegerArrayVariable:{Int ..}
data ro gIntegerArrayInitialized:Int:16:< data ro gIntegerArrayInitialized:Int:16:
3948 293 293049 948 912 <
340 0 2304 0 4785 92> 3948
data ro jObject:Obj:( 293
293049
948
912
340
0
2304
0
4785
92
>
data ro jObject:Obj:
(
.this:<324> .this:<324>
.that:<324>) .that:<324>
data ro kNestedObject:Obj:( )
data ro kNestedObject:Obj:
(
.ro newMember:Int:<9023> .ro newMember:Int:<9023>
.this:( .this:
(
.bird0:<324> .bird0:<324>
.bird1:<"hello world">) .bird1:<"hello world">
.that:( )
.that:
(
.bird2:<123.8439> .bird2:<123.8439>
.bird3:<9328.21348239>)) .bird3:<9328.21348239>
)
)
data ro lMutIntegerArray16:Int:16:mut data ro lMutIntegerArray16:Int:16:mut
data ro mExternalData:Int:8 data ro mExternalData:Int:8
external external
data ro nIntegerArrayInitialized:Int:16:mut:< data ro nIntegerArrayInitialized:Int:16:mut:
3948 293 293049 948 912 <
340 0 2304 0 4785 92> 3948
293
293049
948
912
340
0
2304
0
4785
92
>
`, test) `, test)
} }

View File

@ -66,12 +66,22 @@ func (identifier Identifier) ToString () (output string) {
return return
} }
func (what Type) ToString () (output string) { func (values ObjectDefaultValues) ToString (indent int) (output string) {
return
}
func (values ArrayDefaultValues) ToString (indent int) (output string) {
return
}
func (what Type) ToString (indent int) (output string) {
if what.kind == TypeKindBasic { if what.kind == TypeKindBasic {
output += what.name.ToString() output += what.name.ToString()
} else { } else {
output += "{" output += "{"
output += what.points.ToString() output += what.points.ToString(indent)
if what.kind == TypeKindVariableArray { if what.kind == TypeKindVariableArray {
output += " .." output += " .."