Example #1
0
 public NumericVariableOperand(NumericVariable variable)
     : base(ExpressionNodeType.NumericVariable)
 {
     NumericVariable = variable;
 }
Example #2
0
 public NumericVariableOperand(NumericVariable variable) : base(ExpressionNodeType.NumericVariable)
 {
     NumericVariable = variable;
 }
        internal NumericVariable CreateNumericVariableOrIndex(CodeElementsParser.NumericVariableOrIndexContext context)
        {
            NumericVariable variable = null;
            if (context.identifierOrIndexName() != null)
            {
                variable = new NumericVariable(
                    CreateIdentifierOrIndexName(context.identifierOrIndexName()));
            }
            else
            {
                variable = new NumericVariable(
                    CobolWordsBuilder.CreateNumericValue(context.numericValue()));
            }

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

            return variable;
        }
        internal NumericVariable CreateNumericVariable(CodeElementsParser.NumericVariable2Context context)
        {
            var variable = new NumericVariable(
                    new DataOrConditionStorageArea(
                        CobolWordsBuilder.CreateDataNameReference(context.dataNameReference())));

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

            return variable;
        }
        internal NumericVariable CreateNumericVariable(CodeElementsParser.NumericVariable1Context context)
        {
            var variable = new NumericVariable(
                CreateIdentifier(context.identifier()));

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

            return variable;
        }
Example #6
0
 public virtual bool Visit(NumericVariable numericVariable)
 {
     return(true);
 }