Пример #1
0
        ScopeProcessor(ShaderGenerator g, Scope scope)
            : base(g.Compiler.Pass)
        {
            Generator = g;
            Location  = g.LocationStack.Last();
            Property  = g.GetProperty(Location);
            Method    = new Method(Property.Source, g.Path.DrawBlock.Method.DeclaringType,
                                   null, Modifiers.Private | Modifiers.Static | Modifiers.Generated,
                                   g.CreateFieldName(Property, Location), Property.ReturnType,
                                   new Parameter[0]);

            Method.SetBody(scope.CopyNullable(new CopyState(Method)));
        }