Inheritance: Statement
        public override void PostWalk(DelStatement node)
        {
            Content("delete {0}", Content());

            CommonPostWalk(node);
        }
Exemple #2
0
        // DelStatement
        public override bool Walk(DelStatement node)
        {
            node.Parent = _currentScope;

            foreach (Expression e in node.Expressions) {
                e.Walk(_delete);
            }
            return true;
        }
Exemple #3
0
 // del_stmt: "del" target_list
 //  for error reporting reasons we allow any expression and then report the bad
 //  delete node when it fails.  This is the reason we don't call ParseTargetList.
 private Statement ParseDelStmt() {
     NextToken();
     SourceLocation start = GetStart();
     List<Expression> l = ParseExprList();
     DelStatement ret = new DelStatement(l.ToArray());
     ret.SetLoc(start, GetEnd());
     return ret;
 }
 public override bool Walk(DelStatement node)
 {
     CommonWalk(node);
     return true;
 }
 // DelStatement
 public override bool Walk(DelStatement node)
 {
     delAnalyzer.Analyze(node);
     return true;
 }
 public void Analyze(DelStatement ds)
 {
     delStatement = ds;
     foreach (Expression e in delStatement.Expressions) {
         e.Walk(this);
     }
 }
 public void PostWalk(DelStatement node)
 {
     PostProcess(node);
 }
 // DelStatement
 public virtual bool Walk(DelStatement node)
 {
     return true;
 }
Exemple #9
0
 // DelStmt
 public override void PostWalk(DelStatement node) {
     foreach (Expression e in node.Expressions) {
         e.Walk(_fdel);
     }
 }
 // DelStatement
 public override bool Walk(DelStatement node) {
     foreach (Expression e in node.Expressions) {
         e.Walk(_delete);
     }
     return true;
 }
 public DelDefinition(DelStatement delStatement)
 {
     this.delStatement = delStatement;
 }
 public override bool Walk(DelStatement node)
 {
     Emit(node); return false;
 }
 public virtual void PostWalk(DelStatement node)
 {
 }
Exemple #14
0
 internal Delete(DelStatement stmt)
     : this() {
     _targets = PythonOps.MakeEmptyList(stmt.Expressions.Count);
     foreach (Compiler.Ast.Expression expr in stmt.Expressions)
         _targets.Add(Convert(expr, Del.Instance));
 }
 // DelStatement
 public bool Walk(DelStatement node)
 {
     return Process(node);
 }
Exemple #16
0
        // del_stmt: "del" target_list
        //  for error reporting reasons we allow any expression and then report the bad
        //  delete node when it fails.  This is the reason we don't call ParseTargetList.
        private Statement ParseDelStmt() {
            NextToken();
            var start = GetStart();
            List<Expression> l = ParseExprList();
            foreach (Expression e in l) {
                string delError = e.CheckDelete();
                if (delError != null) {
                    ReportSyntaxError(e.StartIndex, e.EndIndex, delError, ErrorCodes.SyntaxError);
                }
            }

            DelStatement ret = new DelStatement(l.ToArray());
            ret.SetLoc(_globalParent, start, GetEnd());
            return ret;
        }
 public void Visit(PyAst.DelStatement node) => throw CreateNotImplementedEx();