Esempio n. 1
0
        Instruction AnalyseVariableValueInstruction(Tokenizer.Token[] Tokens, int index, out int tokenCount)
        {
            InstructionVariableValue instructionVariableValue = new InstructionVariableValue();

            instructionVariableValue.VariableName = Tokens[index].Value;

            tokenCount = 1;

            int tc = 0;

            instructionVariableValue.Path = AnalysePath(Tokens, index + tokenCount, out tc);
            tokenCount += tc;

            return(instructionVariableValue);
        }
Esempio n. 2
0
        InstructionResult ExecuteInstructionVariableValue(Instruction instruction)
        {
            InstructionVariableValue instructionVariableValue = instruction as InstructionVariableValue;

            Variable variable = GetVariableByName(instructionVariableValue.VariableName);

            ThrowExceptionOnCondition(variable == null, instruction, 30003, new string[] { instructionVariableValue.VariableName });
            Value value = GetVariableValue(variable);

            value = ResolvePath(value, instructionVariableValue.Path);

            return(new InstructionResult()
            {
                Value = value
            });
        }