C# 클래스 IronPython.Compiler.Ast.WithStatement

상속: Statement
파일 보기 프로젝트 열기: jschementi/iron 1 사용 예제들

공개 메소드들

메소드 설명
Reduce ( ) : Expression

WithStatement is translated to the DLR AST equivalent to the following Python code snippet (from with statement spec): mgr = (EXPR) exit = mgr.__exit__ # Not calling it yet value = mgr.__enter__() exc = True try: VAR = value # Only if "as VAR" is present BLOCK except: # The exceptional case is handled here exc = False if not exit(*sys.exc_info()): raise # The exception is swallowed if exit() returns true finally: # The normal and non-local-goto cases are handled here if exc: exit(None, None, None)

Walk ( IronPython.Compiler.Ast.PythonWalker walker ) : void
WithStatement ( Expression contextManager, Expression var, Statement body ) : System

비공개 메소드들

메소드 설명
MakeExitCall ( System.Linq.Expressions exit, System.Linq.Expressions exception ) : Expression

메소드 상세

Reduce() 공개 메소드

WithStatement is translated to the DLR AST equivalent to the following Python code snippet (from with statement spec): mgr = (EXPR) exit = mgr.__exit__ # Not calling it yet value = mgr.__enter__() exc = True try: VAR = value # Only if "as VAR" is present BLOCK except: # The exceptional case is handled here exc = False if not exit(*sys.exc_info()): raise # The exception is swallowed if exit() returns true finally: # The normal and non-local-goto cases are handled here if exc: exit(None, None, None)
public Reduce ( ) : Expression
리턴 System.Linq.Expressions.Expression

Walk() 공개 메소드

public Walk ( IronPython.Compiler.Ast.PythonWalker walker ) : void
walker IronPython.Compiler.Ast.PythonWalker
리턴 void

WithStatement() 공개 메소드

public WithStatement ( Expression contextManager, Expression var, Statement body ) : System
contextManager Expression
var Expression
body Statement
리턴 System