/// <summary>
        /// Gets the enclosing binder associated with the node
        /// </summary>
        /// <param name="position"></param>
        /// <returns></returns>
        internal override Binder GetEnclosingBinderInternal(int position)
        {
            AssertPositionAdjusted(position);
            SyntaxToken token = this.Root.FindToken(position);

            // If we're before the start of the first token, just return
            // the binder for the compilation unit.
            if (position == 0 && position != token.SpanStart)
            {
                return(_binderFactory.GetBinder(this.Root, position, true).WithAdditionalFlags(GetSemanticModelBinderFlags()));
            }

            MemberSemanticModel memberModel = GetMemberModel(position);

            if (memberModel != null)
            {
                return(memberModel.GetEnclosingBinder(position));
            }

            return(_binderFactory.GetBinder(token).WithAdditionalFlags(GetSemanticModelBinderFlags()));
        }
 private static BoundNode GetBoundRoot(MemberSemanticModel memberModel, out Symbol member)
 {
     member = memberModel.MemberSymbol;
     return(memberModel.GetBoundRoot());
 }