IronPython.Compiler.Ast.WhileStatement.SetLoc C# (CSharp) Method

SetLoc() public method

public SetLoc ( IronPython.Compiler.Ast.PythonAst globalParent, int start, int header, int end ) : void
globalParent IronPython.Compiler.Ast.PythonAst
start int
header int
end int
return void
        public void SetLoc(PythonAst globalParent, int start, int header, int end) {
            SetLoc(globalParent, start, end);
            _indexHeader = header;
        }

Usage Example

Example #1
0
 //while_stmt: 'while' expression ':' suite ['else' ':' suite]
 private WhileStatement ParseWhileStmt() {
     Eat(TokenKind.KeywordWhile);
     var start = GetStart();
     Expression expr = ParseExpression();
     var mid = GetEnd();
     Statement body = ParseLoopSuite();
     Statement else_ = null;
     if (MaybeEat(TokenKind.KeywordElse)) {
         else_ = ParseSuite();
     }
     WhileStatement ret = new WhileStatement(expr, body, else_);
     ret.SetLoc(_globalParent, start, mid, GetEnd());
     return ret;
 }
All Usage Examples Of IronPython.Compiler.Ast.WhileStatement::SetLoc