internal SymbolReferenceVariable CreateProgramNameVariable(CodeElementsParser.ProgramNameVariableContext context) { if (context.programNameReference1() != null) { SymbolReference symbolReference = CobolWordsBuilder.CreateProgramNameReference(context.programNameReference1()); return new SymbolReferenceVariable(StorageDataType.ProgramName, symbolReference); } if (context.identifier() != null) { StorageArea storageArea = CreateIdentifier(context.identifier()); return new SymbolReferenceVariable(StorageDataType.ProgramName, storageArea); } return null; }
internal SymbolReferenceVariable CreateProgramNameVariable(CodeElementsParser.ProgramNameVariableContext context) { SymbolReferenceVariable variable = null; if (context.programNameReference1() != null) { SymbolReference symbolReference = CobolWordsBuilder.CreateProgramNameReference(context.programNameReference1()); variable = new SymbolReferenceVariable(StorageDataType.ProgramName, symbolReference); } if (context.identifier() != null) { StorageArea storageArea = CreateIdentifier(context.identifier()); variable = new SymbolReferenceVariable(StorageDataType.ProgramName, storageArea); } // Collect storage area read/writes at the code element level if (variable!= null && variable.StorageArea != null) { this.storageAreaReads.Add(variable.StorageArea); } return variable; }