コード例 #1
0
        public Scope Split(Scope root, SplitPoint splitPoint, bool isImplicit)
        {
            Scope inner          = root.FindInnerScope(splitPoint.StartIndex, 1);
            int   requiredLength = splitPoint.Length;

            if (requiredLength == inner.Length)
            {
                requiredLength -= 1;
            }
            Scope newScope = inner.DefineInnerScope(splitPoint.StartIndex, requiredLength);

            newScope.IsImplicit = isImplicit;
            return(newScope);
        }
コード例 #2
0
 public Scope Split(Scope root, SplitPoint splitPoint, bool isImplicit)
 {
     Scope inner = root.FindInnerScope(splitPoint.StartIndex, 1);
     int requiredLength = splitPoint.Length;
     if(requiredLength==inner.Length)
     {
         requiredLength -= 1;
     }
     Scope newScope = inner.DefineInnerScope(splitPoint.StartIndex, requiredLength);
     newScope.IsImplicit= isImplicit;
     return newScope;
 }