Boo.Lang.Compiler.Steps.NormalizeStatementModifiers.CreateModifiedStatement C# (CSharp) Метод

CreateModifiedStatement() публичный статический Метод

public static CreateModifiedStatement ( Boo.Lang.Compiler.Ast.StatementModifier modifier, Statement node ) : Statement
modifier Boo.Lang.Compiler.Ast.StatementModifier
node Boo.Lang.Compiler.Ast.Statement
Результат Boo.Lang.Compiler.Ast.Statement
        public static Statement CreateModifiedStatement(StatementModifier modifier, Statement node)
        {
            Block block;
            Statement stmt = MapStatementModifier(modifier, out block);
            block.Add(node);
            return stmt;
        }

Usage Example

Пример #1
0
        private void ProcessMacro(Type actualType, MacroStatement node)
        {
            // HACK: workaround for mono
            if (-1 == Array.IndexOf(actualType.GetInterfaces(), typeof(IAstMacro)))
//			if (!typeof(IAstMacro).IsAssignableFrom(actualType))
            {
                Errors.Add(CompilerErrorFactory.InvalidMacro(node, actualType.FullName));
                return;
            }

            try
            {
                Statement replacement = ExpandMacro(actualType, node);
                if (null != node.Modifier)
                {
                    replacement = NormalizeStatementModifiers.CreateModifiedStatement(node.Modifier, replacement);
                }
                ReplaceCurrentNode(replacement);
            }
            catch (Exception error)
            {
                Errors.Add(CompilerErrorFactory.MacroExpansionError(node, error));
            }
        }
All Usage Examples Of Boo.Lang.Compiler.Steps.NormalizeStatementModifiers::CreateModifiedStatement