// -- Section -- public override void EnterSectionHeader(CodeElementsParser.SectionHeaderContext context) { var sectionHeader = new SectionHeader(); sectionHeader.SectionName = CobolWordsBuilder.CreateSectionNameDefinition(context.sectionNameDefinition()); if (context.priorityNumber() != null) { sectionHeader.PriorityNumber = CobolWordsBuilder.CreateIntegerValue(context.priorityNumber().integerValue()); } Context = context; CodeElement = sectionHeader; }
// -- Section -- public override void EnterSectionHeader(CodeElementsParser.SectionHeaderContext context) { var sectionHeader = new SectionHeader(); Token sectionName = ParseTreeUtils.GetFirstToken(context.sectionNameDefinition()); if (sectionName != null) { sectionHeader.SectionName = new SectionName(sectionName); } Token priorityNumber = ParseTreeUtils.GetFirstToken(context.priorityNumber()); if (priorityNumber != null) { sectionHeader.PriorityNumber = new SyntaxNumber(priorityNumber); } Context = context; CodeElement = sectionHeader; }