Пример #1
0
 // Code structure
 ////////////////////
 // IDENTIFICATION //
 ////////////////////
 // PROGRAM IDENTIFICATION
 ////////////////////////////
 public override void EnterProgramIdentification(CodeElementsParser.ProgramIdentificationContext context)
 {
     var program = new ProgramIdentification();
     program.ProgramName = CobolWordsBuilder.CreateProgramNameDefinition(context.programNameDefinition());
     if (context.COMMON() != null) {
         program.Common = new SyntaxProperty<bool>(true, ParseTreeUtils.GetFirstToken(context.COMMON()));
     }
     if (context.INITIAL() != null) {
         program.Initial = new SyntaxProperty<bool>(true, ParseTreeUtils.GetFirstToken(context.INITIAL()));
     }
     if (context.RECURSIVE() != null) {
         program.Recursive = new SyntaxProperty<bool>(true, ParseTreeUtils.GetFirstToken(context.RECURSIVE()));
     }
     program.AuthoringProperties = CreateAuthoringProperties(context.authoringProperties());
     Context = context;
     CodeElement = program;
 }
Пример #2
0
        // CLASS IDENTIFICATION
        //////////////////////////
        public override void EnterClassIdentification(CodeElementsParser.ClassIdentificationContext context)
        {
            var classIdentification = new ClassIdentification();
            classIdentification.ClassName = CobolWordsBuilder.CreateClassNameDefinition(context.classNameDefinition());
            classIdentification.InheritsFrom = CobolWordsBuilder.CreateClassNameReference(context.inheritsFromClassName);
            classIdentification.AuthoringProperties = CreateAuthoringProperties(context.authoringProperties());

            Context = context;
            CodeElement = classIdentification;
        }
Пример #3
0
        // METHOD IDENTIFICATION
        ///////////////////////////
        public override void EnterMethodIdentification(CodeElementsParser.MethodIdentificationContext context)
        {
            var methodIdentification = new MethodIdentification();
            methodIdentification.MethodName = CobolWordsBuilder.CreateMethodNameDefinition(context.methodNameDefinition());
            methodIdentification.AuthoringProperties = CreateAuthoringProperties(context.authoringProperties());

            Context = context;
            CodeElement = methodIdentification;
        }