Beispiel #1
0
        public void SetConstructor(Method method, EnegyData data, VariabelDatabase db, Posision pos)
        {
            if(container.Constructor != null)
            {
                data.setError(new ScriptError("A class can only have one constructor", pos), db);
                return;
            }

            container.Constructor = method.GetMethodContainer();
        }
Beispiel #2
0
        public void SetMethod(Method method, EnegyData data, VariabelDatabase db, Posision pos)
        {
            MethodContainer mc = method.GetMethodContainer();

            if(!Control(mc.Name, data, db, pos))
            {
                return;
            }

            if (mc.IsStatic)
                container.StaticMethod.Add(mc.Name, mc);
            else
                container.Methods.Add(mc.Name, mc);
        }