protected void updateFanout(EntryId fanoutId, CallArgument[] callArguments) {
   if (fanoutId != null) {
     if ((callArguments != null)
         && (callArguments.length > 0)
         && !inFilemanRoutine(this.currentRoutineName, true)) {
       CallArgument ca = callArguments[0];
       if (ca != null) {
         CallArgumentType caType = ca.getType();
         if ((caType == CallArgumentType.STRING_LITERAL)
             || (caType == CallArgumentType.NUMBER_LITERAL)) {
           String routineName = fanoutId.getRoutineName();
           if ((routineName != null)
               && (routineName.length() > 1)
               && inFilemanRoutine(routineName, false)) {
             Node caNode = ca.getNode();
             String cleanValue = removeDoubleQuote(caNode.getAsConstExpr());
             if (cleanValue.length() > 0 && validate(cleanValue)) {
               String value = fanoutId.toString() + "(" + cleanValue;
               this.filemanCalls.add(value);
             }
           }
         }
       }
     }
   }
 }
Пример #2
0
 @Override
 public Node getNode() {
   AtomicGoto result = new AtomicGoto();
   for (MToken t : this.toIterable()) {
     if (t != null) {
       Node node = t.getNode();
       if (node != null) node.update(result);
     }
   }
   return result;
 }
 @Override
 protected void setLocal(Local local, Node rhs) {
   if ((rhs != null) && !inFilemanRoutine(this.currentRoutineName, true)) {
     String rhsAsConst = rhs.getAsConstExpr();
     if (rhsAsConst != null) {
       String name = local.getName().toString();
       if (name.startsWith("DI") && (name.length() == 3)) {
         char ch = name.charAt(2);
         if ((ch == 'E') || (ch == 'K') || (ch == 'C')) {
           rhsAsConst = removeDoubleQuote(rhsAsConst);
           if ((rhsAsConst.length() > 0) && (rhsAsConst.charAt(0) == '^')) {
             String[] namePieces = rhsAsConst.split("\\(");
             if ((namePieces[0].length() > 0)) {
               String result = namePieces[0] + "(";
               if ((namePieces.length > 1)
                   && (namePieces[1] != null)
                   && (namePieces[1].length() > 0)) {
                 String[] subscripts = namePieces[1].split("\\,");
                 if ((subscripts.length > 0)
                     && (subscripts[0].length() > 0)
                     && validate(subscripts[0])) {
                   result += subscripts[0];
                 }
               }
               this.filemanGlobals.add(result);
             }
           }
         }
       }
     }
   }
 }