Beispiel #1
0
        public void makeVarStatic(string varName, int line, int column, SourceFile ast)
        {
            VarPath varpath = this.getVarPath(varName, line, column, ast);

            DynVarManager dynVarManager = new DynVarManager();

            string filename = Path.ChangeExtension(ast.Location.FileName, DynVarManagement.DynVarManager.DynVarFileExt);

            dynVarManager.LoadOrCreate(filename);
            dynVarManager.SetStatic(varpath);
            dynVarManager.Save();
        }
        public override object Visit(AST.SourceFile node, object obj)
        {
            //Prepare DynFile and DynVarManager
            this.dynVarManager = new DynVarManager();
            string dynFilename = Path.ChangeExtension(this.filename, DynVarManagement.DynVarManager.DynVarFileExt);

            dynVarManager.LoadOrCreate(dynFilename);

            //Star visiting nodes
            base.Visit(node, obj);

            //Save the results when all its done
            dynVarManager.Save();

            return(null);
        }