C# Класс IronPython.Compiler.Ast.WithStatement

Наследование: Statement
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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