public Container GetVariable(string name)
        {
            if (Variables.ContainsKey(name))
            {
                return(Variables[name]);
            }

            if (ParentBlock != null)
            {
                return(ParentBlock.GetVariable(name));
            }

            throw new ArgumentException($"Variable <{name}> not in scope");
        }
Beispiel #2
0
 public Container GetVariable(string name) => ParentBlock.GetVariable(name);