C# Класс Phantom.Core.Builtins.WithMacro

The 'with' macro can be used to turn this: with Foo(): .bar() .baz() ...into this: var foo = new Foo(); foo.bar(); foo.baz(); ...it also works with alternative syntaxes: with f = Foo(): .bar() .baz() ... this means you can continue to access the 'f' variable after the with block has completed. f = Foo() with f: .bar() .baz() This would be much simpler if I wrote the macro in Boo rather than C#, but I thought this would be fun...
Наследование: Boo.Lang.Compiler.AbstractAstMacro
Показать файл Открыть проект

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

Метод Описание
Expand ( MacroStatement macro ) : Statement

Приватные методы

Метод Описание
AddRunExpressionToBody ( Block block, Expression temporaryVariable ) : void
ConvertExpressionToTemporaryVariable ( Expression methodInvocation, Block block ) : Expression

Описание методов

Expand() публичный Метод

public Expand ( MacroStatement macro ) : Statement
macro Boo.Lang.Compiler.Ast.MacroStatement
Результат Boo.Lang.Compiler.Ast.Statement