public override int doFinalize()
 {
     ReferencedType = new VarTypeObject(((Ident)this.children[0]).LastIdent.ReferencedType);
     if(this.TemplateObject != null)
     {
         this.ReferencedType.TemplateObject = this.TemplateObject;
     }
     return 0;
 }
        public VarTypeObject(Ident i, bool isStrict = false, Template template = null)
        {
            this.ident = i;
            this.varType = isStrict ? VarType.ObjectStrict : VarType.Object;
            this.template = template;

            if(this.template == null && (this.ident.ReferencedObject is Interfaces.iTemplate))
            {
                this.template = ((Interfaces.iTemplate)this.ident.ReferencedObject).TemplateObject;
            }
        }
 public VarTypeObject(VarTypeObject vto)
 {
     this.ident = vto.ident;
     this.varType = vto.varType;
     template = vto.template;
 }
 public VarTypeObject(VarType v)
 {
     this.ident = null;
     this.varType = v;
     if (v == VarType.ObjectStrict || v == VarType.Object)
         throw new Exception("TODO: Allow anonymous objects");
     template = null;
     //TODO: Allow anonymous objects
 }