Beispiel #1
0
 // ExecStatement
 public override bool Walk(ExecStatement node)
 {
     node.Parent = _currentScope;
     if (node.Locals == null && node.Globals == null)
     {
         Debug.Assert(_currentScope != null);
         _currentScope.ContainsUnqualifiedExec = true;
     }
     return(true);
 }
Beispiel #2
0
        public override void PostWalk(ExecStatement node)
        {
            if (node.NeedsLocalsDictionary())
            {
                _currentScope.NeedsLocalsDictionary = true;
            }

            if (node.Locals == null)
            {
                _currentScope.HasLateBoundVariableSets = true;
            }
        }
Beispiel #3
0
 // ExecStatement
 public override bool Walk(ExecStatement node)
 {
     node.Parent = _currentScope;
     if (node.Locals == null && node.Globals == null) {
         Debug.Assert(_currentScope != null);
         _currentScope.ContainsUnqualifiedExec = true;
     }
     return true;
 }
Beispiel #4
0
        public override void PostWalk(ExecStatement node)
        {
            if (node.NeedsLocalsDictionary()) {
                _currentScope.NeedsLocalsDictionary = true;
            }

            if (node.Locals == null) {
                _currentScope.HasLateBoundVariableSets = true;
            }
        }
Beispiel #5
0
 public override bool Walk(ExecStatement node)
 {
     CommonWalk(node);
     return true;
 }
Beispiel #6
0
 public override void PostWalk(ExecStatement node)
 {
     CommonPostWalk(node);
 }
 public void PostWalk(ExecStatement node)
 {
     PostProcess(node);
 }
Beispiel #8
0
 // ExecStmt
 public override bool Walk(ExecStatement node)
 {
     if (node.Locals == null && node.Globals == null) {
         Debug.Assert(current != null);
         current.ContainsUnqualifiedExec = true;
     }
     return true;
 }
Beispiel #9
0
 public override void PostWalk(ExecStatement node) {
     if (node.NeedsLocalsDictionary()) {
         _currentScope.NeedsLocalsDictionary = true;
     }
 }
 public override void PostWalk(ExecStatement node)
 {
     MightNeedLocals |= node.NeedsLocalsDictionary();
 }
 public override bool Walk(ExecStatement node)
 {
     Emit(node); return false;
 }
 public virtual void PostWalk(ExecStatement node)
 {
 }
 // ExecStatement
 public virtual bool Walk(ExecStatement node)
 {
     return true;
 }
Beispiel #14
0
 public Exec(ExecStatement stmt)
     : this() {
     _body = Convert(stmt.Code);
     if (stmt.Globals != null)
         _globals = Convert(stmt.Globals);
     if (stmt.Locals != null)
         _locals = Convert(stmt.Locals);
 }
 // ExecStatement
 public bool Walk(ExecStatement node)
 {
     return Process(node);
 }
Beispiel #16
0
 //exec_stmt: 'exec' expr ['in' expression [',' expression]]
 private ExecStatement ParseExecStmt() {
     Eat(TokenKind.KeywordExec);
     var start = GetStart();
     Expression code, locals = null, globals = null;
     code = ParseExpr();
     if (MaybeEat(TokenKind.KeywordIn)) {
         globals = ParseExpression();
         if (MaybeEat(TokenKind.Comma)) {
             locals = ParseExpression();
         }
     }
     ExecStatement ret = new ExecStatement(code, locals, globals);
     ret.SetLoc(_globalParent, start, GetEnd());
     return ret;
 }
 public void Visit(PyAst.ExecStatement node) => throw CreateNotImplementedEx();