Пример #1
0
        public static Module Deserialize(Interpreter interpreter, string code, ModuleRuntimeState state)
        {
            Module m = new Module(interpreter, state.moduleName, interpreter.GetTypes(), code);

            m.linePosition  = state.linePosition;
            m.tokenPosition = state.tokenPosition;
            m.MoudleName    = state.moduleName;
            return(m);
        }
Пример #2
0
        public ModuleRuntimeState GetSerializeObject()
        {
            ModuleRuntimeState mrs = new ModuleRuntimeState()
            {
                moduleName    = this.MoudleName,
                linePosition  = this.linePosition,
                tokenPosition = this.tokenPosition,
            };

            return(mrs);
        }