Exemplo n.º 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);
 }
Exemplo n.º 2
0
        public override void PostWalk(ExecStatement node)
        {
            if (node.NeedsLocalsDictionary())
            {
                _currentScope.NeedsLocalsDictionary = true;
            }

            if (node.Locals == null)
            {
                _currentScope.HasLateBoundVariableSets = true;
            }
        }
Exemplo n.º 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;
 }
Exemplo n.º 4
0
        public override void PostWalk(ExecStatement node)
        {
            if (node.NeedsLocalsDictionary()) {
                _currentScope.NeedsLocalsDictionary = true;
            }

            if (node.Locals == null) {
                _currentScope.HasLateBoundVariableSets = true;
            }
        }
Exemplo n.º 5
0
 public override bool Walk(ExecStatement node)
 {
     CommonWalk(node);
     return true;
 }
Exemplo n.º 6
0
 public override void PostWalk(ExecStatement node)
 {
     CommonPostWalk(node);
 }
 public void PostWalk(ExecStatement node)
 {
     PostProcess(node);
 }
Exemplo n.º 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;
 }
Exemplo n.º 9
0
 public override void PostWalk(ExecStatement node) {
     if (node.NeedsLocalsDictionary()) {
         _currentScope.NeedsLocalsDictionary = true;
     }
 }
Exemplo n.º 10
0
 public override void PostWalk(ExecStatement node)
 {
     MightNeedLocals |= node.NeedsLocalsDictionary();
 }
 public override bool Walk(ExecStatement node)
 {
     Emit(node); return false;
 }
Exemplo n.º 12
0
 public virtual void PostWalk(ExecStatement node)
 {
 }
Exemplo n.º 13
0
 // ExecStatement
 public virtual bool Walk(ExecStatement node)
 {
     return true;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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;
 }
Exemplo n.º 17
0
 public void Visit(PyAst.ExecStatement node) => throw CreateNotImplementedEx();