public VariableDeclaration GetVariable(string name) { VariableDeclaration v = null; if (!_variables.TryGetValue(name, out v)) { if (_parent != null) { return(_parent.GetVariable(name)); } } if (v != null) { if (!v.IsChecked) { v.CheckSemantic(this, Log); v.IsChecked = true; } v.IsUsed = true; } return(v); }