internal AlphanumericVariable CreateAlphanumericVariable(CodeElementsParser.AlphanumericVariable1Context context)
        {
            AlphanumericVariable variable = null;
            if (context.identifier() != null)
            {
                variable = new AlphanumericVariable(
                    CreateIdentifier(context.identifier()));
            }
            else
            {
                variable = new AlphanumericVariable(
                    CobolWordsBuilder.CreateAlphanumericValue(context.alphanumericValue3()));
            }

            // Collect storage area read/writes at the code element level
            if (variable.StorageArea != null)
            {
                this.storageAreaReads.Add(variable.StorageArea);
            }

            return variable;
        }
        internal AlphanumericVariable CreateAlphanumericVariable([CanBeNull] CodeElementsParser.AlphanumericVariable2Context context)
        {
            if (context == null) return null;
            AlphanumericVariable variable = null;
            if (context.identifier() != null) {
                variable = new AlphanumericVariable(
                    CreateIdentifier(context.identifier()));
            } else {
                if (context.alphanumericValue2() != null) {
                    variable = new AlphanumericVariable(CobolWordsBuilder.CreateAlphanumericValue(context.alphanumericValue2()));
                } else {
                    variable = new AlphanumericVariable(CobolWordsBuilder.CreateRepeatedCharacterValue(context.repeatedCharacterValue1()));
                }
            }

            // Collect storage area read/writes at the code element level
            if (variable.StorageArea != null)
            {
                this.storageAreaReads.Add(variable.StorageArea);
            }

            return variable;
        }
Example #3
0
 public virtual bool Visit(AlphanumericVariable alphanumericVariable)
 {
     return(true);
 }