internal SymbolReferenceVariable CreateMethodNameVariable(CodeElementsParser.MethodNameVariableContext context) { if (context.methodNameReference() != null) { SymbolReference symbolReference = CobolWordsBuilder.CreateMethodNameReference(context.methodNameReference()); return new SymbolReferenceVariable(StorageDataType.MethodName, symbolReference); } else { StorageArea storageArea = CreateIdentifier(context.identifier()); return new SymbolReferenceVariable(StorageDataType.MethodName, storageArea); } }
public override void EnterMethodEnd(CodeElementsParser.MethodEndContext context) { var methodEnd = new MethodEnd(); methodEnd.MethodName = CobolWordsBuilder.CreateMethodNameReference(context.methodNameReference()); Context = context; CodeElement = methodEnd; }
internal SymbolReferenceVariable CreateMethodNameVariable(CodeElementsParser.MethodNameVariableContext context) { SymbolReferenceVariable variable = null; if (context.methodNameReference() != null) { SymbolReference symbolReference = CobolWordsBuilder.CreateMethodNameReference(context.methodNameReference()); variable = new SymbolReferenceVariable(StorageDataType.MethodName, symbolReference); } else { StorageArea storageArea = CreateIdentifier(context.identifier()); variable = new SymbolReferenceVariable(StorageDataType.MethodName, storageArea); } // Collect storage area read/writes at the code element level if (variable.StorageArea != null) { this.storageAreaReads.Add(variable.StorageArea); } return variable; }