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

            if (node.Locals == null)
            {
                _currentScope.HasLateBoundVariableSets = true;
            }
        }
 public override bool Walk(ExecStatement node) {
     CanComplete = IsActualExpression(node.Code);
     CommitByDefault = true;
     return base.Walk(node);
 }
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
 //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;
 }
Beispiel #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;
 }
Beispiel #7
0
        public override bool Walk(ExecStatement node) {
            UpdateLineInfo(node);

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