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

            if (node.Locals == null)
            {
                _currentScope.HasLateBoundVariableSets = true;
            }
        }
Пример #3
0
 public override bool Walk(ExecStatement node) {
     CanComplete = IsActualExpression(node.Code);
     CommitByDefault = true;
     return base.Walk(node);
 }
Пример #4
0
        public override void PostWalk(ExecStatement node) {
            if (node.NeedsLocalsDictionary()) {
                _currentScope.NeedsLocalsDictionary = true;
            }

            if (node.Locals == null) {
                _currentScope.HasLateBoundVariableSets = true;
            }
        }
Пример #5
0
 //exec_stmt: 'exec' expr ['in' expression [',' expression]]
 private ExecStatement ParseExecStmt() {
     Eat(TokenKind.KeywordExec);
     string execWhiteSpace = _tokenWhiteSpace;
     var start = GetStart();
     Expression code, locals = null, globals = null;
     code = ParseExpr();
     string inWhiteSpace = null, commaWhiteSpace = null;
     if (MaybeEat(TokenKind.KeywordIn)) {
         inWhiteSpace = _tokenWhiteSpace;
         globals = ParseExpression();
         if (MaybeEat(TokenKind.Comma)) {
             commaWhiteSpace = _tokenWhiteSpace;
             locals = ParseExpression();
         }
     }
     var codeTuple = code as TupleExpression;
     if (_langVersion.Is2x() && codeTuple != null) {
         if (codeTuple.Items != null) {
             if (codeTuple.Items.Count >= 3) {
                 locals = codeTuple.Items[2];
             }
             if (codeTuple.Items.Count >= 2) {
                 globals = codeTuple.Items[1];
             }
             if (codeTuple.Items.Count >= 1) {
                 code = codeTuple.Items[0];
             }
         }
     }
     ExecStatement ret = new ExecStatement(code, locals, globals);
     if (_verbatim) {
         AddPreceedingWhiteSpace(ret, execWhiteSpace);
         AddSecondPreceedingWhiteSpace(ret, inWhiteSpace);
         AddThirdPreceedingWhiteSpace(ret, commaWhiteSpace);
     }
     ret.SetLoc(start, GetEnd());
     return ret;
 }
Пример #6
0
 // ExecStatement
 public override bool Walk(ExecStatement node) {
     if (node.Locals == null && node.Globals == null) {
         Debug.Assert(_currentScope != null);
         _currentScope.ContainsUnqualifiedExec = true;
     }
     return true;
 }
Пример #7
0
        public override bool Walk(ExecStatement node) {
            UpdateLineInfo(node);

            return base.Walk(node);
        }
Пример #8
0
 public override bool Walk(ExecStatement node) {
     UpdateChildRanges(node);
     return base.Walk(node);
 }
Пример #9
0
 public override void PostWalk(ExecStatement node) { PostWalkWorker(node); }
Пример #10
0
 // ExecStatement
 public override bool Walk(ExecStatement node) { return ShouldWalkWorker(node); }