Esempio n. 1
0
        private StringComponentInstruction PopulateValueOf(ScopePrototype scope, ValueOf valueOf)
        {
            // check if value has been declared in the scope
            if (!scope.Variables.Contains(valueOf.VariableName))
            {
                throw new SemanticsException($"Variable {valueOf.VariableName} has not been declared in the scope of function {scope.FunctionName}.");
            }

            var valueOfInstruction = new StringComponentInstruction(scope, valueOf);

            return(valueOfInstruction);
        }
Esempio n. 2
0
        private StringComponentInstruction PopulateLiteral(ScopePrototype scope, Literal literal)
        {
            var literalInstruction = new StringComponentInstruction(scope, literal);

            return(literalInstruction);
        }