public Scope GetScope(Scope parent) { if (_scope == null) { _scope = parent.CreateScope(); foreach (var item in InnerMessages) { _scope.AddDeclaration(item); } foreach (var item in Enums) { _scope.AddDeclaration(item); } } return(_scope); }