Exemplo n.º 1
0
 // - 3. Function calls (allocate a storage area for the result) -
 internal StorageArea CreateFunctionIdentifier(CodeElementsParser.FunctionIdentifierContext context)
 {
     FunctionCallResult result = null;
     if (context.intrinsicFunctionCall() != null) {
         result = new FunctionCallResult(CreateIntrinsicFunctionCall(context.intrinsicFunctionCall()));
     } else { // [TYPECOBOL] user defined function calls
         result = new FunctionCallResult(CreateUserDefinedFunctionCall(context.userDefinedFunctionCall()));
     }
     if (result.DataDescriptionEntry != null) {
         var dataDescription = result.DataDescriptionEntry;
         CobolWordsBuilder.symbolInformationForTokens[result.DataDescriptionEntry.DataName.NameLiteral.Token] = result.DataDescriptionEntry.DataName;
     }
     if (result.SymbolReference != null) {
         CobolWordsBuilder.symbolInformationForTokens[result.SymbolReference.NameLiteral.Token] = result.SymbolReference;
     }
     // Register call parameters (shared storage areas) information at the CodeElement level
     var functionCall = result.FunctionCall;
     var callSite = new CallSite() {
         CallTarget = functionCall is UserDefinedFunctionCall ? ((UserDefinedFunctionCall)functionCall).UserDefinedFunctionName : null, // TO DO : IntrinsicFunctionName
         Parameters = functionCall.Arguments
     };
     this.callSites.Add(callSite);
     return result;
 }
Exemplo n.º 2
0
 public virtual bool Visit(FunctionCallResult functionCallResult)
 {
     return(true);
 }