update for backscrolling, badguy behaviour
[supertux.git] / tools / miniswig / tree.hpp
index 2e7149c..4dfcf1b 100644 (file)
@@ -155,18 +155,47 @@ public:
 
 class Function : public ClassMember {
 public:
+    Function() {
+      type = FUNCTION;
+      suspend = false;
+      custom = false;
+    }
+  
     enum FuncType {
         FUNCTION,
         CONSTRUCTOR,
         DESTRUCTOR
     };
     FuncType type;
+    /// function should suspend squirrel VM after execution
+    bool suspend;
+    /// a custom wrapper (just pass along HSQUIRRELVM)
+    bool custom;
     std::string docu_comment;
     std::string name;
     Type return_type;
     std::vector<Parameter> parameters;
 };
 
+class Field : public ClassMember {
+public:
+    Field()
+    {
+        has_const_value = false;
+    }
+    
+    Type* type;
+    std::string docu_comment;
+    std::string name;
+    bool has_const_value;
+
+    union {
+        float const_float_value;
+        int const_int_value;
+    };
+    std::string const_string_value;
+};
+
 class Class : public AtomicType {
 public:
     ~Class() {
@@ -176,6 +205,8 @@ public:
     }
     
     std::vector<ClassMember*> members;
+    std::vector<Class*> super_classes;
+    std::vector<Class*> sub_classes;
     std::string docu_comment;
 };
 
@@ -243,6 +274,7 @@ public:
     }
                                                                              
     std::vector<Function*> functions;
+    std::vector<Field*> fields;
     std::vector<AtomicType*> types;
     std::vector<Namespace*> namespaces;