From 6cc2945c1d1e6ca7bad0542c79de423df5e2db8b Mon Sep 17 00:00:00 2001
From: Ferenc Szontágh <szf@fsociety.hu>
Date: Fri, 18 Apr 2025 18:13:29 +0000
Subject: [PATCH] implements object type

---
 test_scripts/object.vs |   36 ++++++++++++++++++++++++++++++++++--
 1 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/test_scripts/object.vs b/test_scripts/object.vs
index fa6d218..9b9ce5e 100644
--- a/test_scripts/object.vs
+++ b/test_scripts/object.vs
@@ -1,4 +1,36 @@
+
 object $person = {
     name: "Szoni",
-    age: 37
-};
\ No newline at end of file
+    double age: 37.6
+};
+
+
+object $person2 = {
+    string name: "Not Szoni",
+    int age: 37,
+    object $children: {
+        string name: "Child1",
+        int age: 10
+    }
+};
+
+object $children2 = {
+     string name: "Child2",
+        int age: 15
+};
+
+object $family = {
+           $children: $children, // this is valid too
+    object $children: $children2
+};
+
+object $family3 = {
+    string age: 10  // this is invalid, drops error
+};
+
+
+
+printnl("Hello, ", $person->name);              // prints out: Hello, Szoni
+println("Type: ", typeof($person);              // prints out: Type: object
+println("Type: ", typeof($person2->name));      // prints out: Type: string
+println("Type: ", typeof($person2->age));       // prints out: Type: double

--
Gitblit v1.9.3