// ExecStatement public override bool Walk(ExecStatement node) { if (node.Locals == null && node.Globals == null) { Debug.Assert(_currentScope != null); _currentScope.ContainsUnqualifiedExec = true; } return(true); }
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); }
//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; }
// ExecStatement public override bool Walk(ExecStatement node) { if (node.Locals == null && node.Globals == null) { Debug.Assert(_currentScope != null); _currentScope.ContainsUnqualifiedExec = true; } return true; }
public override bool Walk(ExecStatement node) { UpdateLineInfo(node); return base.Walk(node); }
public override bool Walk(ExecStatement node) { UpdateChildRanges(node); return base.Walk(node); }
public override void PostWalk(ExecStatement node) { PostWalkWorker(node); }
// ExecStatement public override bool Walk(ExecStatement node) { return ShouldWalkWorker(node); }