IronPython.Compiler.Ast.Expression.CheckAssign C# (CSharp) Method

CheckAssign() private method

private CheckAssign ( ) : string
return string
        internal virtual string CheckAssign() {
            return "can't assign to " + NodeName;
        }

Usage Example

Beispiel #1
0
 internal override string CheckAssign()
 {
     if (Items.Count == 0)
     {
         return("can't assign to ()");
     }
     for (int i = 0; i < Items.Count; i++)
     {
         Expression e = Items[i];
         if (e.CheckAssign() != null)
         {
             // we don't return the same message here as CPython doesn't seem to either,
             // for example ((yield a), 2,3) = (2,3,4) gives a different error than
             // a = yield 3 = yield 4.
             return("can't assign to " + e.NodeName);
         }
     }
     return(null);
 }
All Usage Examples Of IronPython.Compiler.Ast.Expression::CheckAssign