Exemple #1
0
        public virtual void EndCobolProgram(TypeCobol.Compiler.CodeElements.ProgramEnd end)
        {
            AttachEndIfExists(end);
            Exit();
            programsStack.Pop();

            if (programsStack.Count == 0) //Means that we ended a main program, reset Table and program in case of a new program declaration before EOF.
            {
                TableOfGlobals = new SymbolTable(TableOfNamespaces, SymbolTable.Scope.Global);
                Program        = null;
            }
        }
        public override void EnterProgramEnd(CodeElementsParser.ProgramEndContext context)
        {
            var programEnd = new ProgramEnd();
            programEnd.ProgramName = CobolWordsBuilder.CreateProgramNameReference(context.programNameReference2());

            Context = context;
            CodeElement = programEnd;
        }