Skip to content

Commit 03be3d2

Browse files
committed
Add exporting example for struct instances in "lib.lang"
1 parent 8052b7b commit 03be3d2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/langmodule/lang/lib.lang

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ fn.moduleExportFunctionPointerVariable(finalFuncFromLib, fn.dec, 1)
3737
}
3838
fn.moduleExportCollectionVariable(ExampleLibStruct, &ExampleLibStruct)
3939

40+
&exampleLibStructInstance = fn.structOf(&ExampleLibStruct, 42.42f, A text value, 42)
41+
fn.moduleExportCollectionVariable(exampleLibStructInstance, &exampleLibStructInstance)
42+
4043
# Exporting pointers
4144
$internalVariable = 42
4245
fn.moduleExportNormalVariable(pointerFromLib, $[internalVariable])

0 commit comments

Comments
 (0)