Example #1
0
 public void WriteBlock(AstBlock a)
 {
     WriteGlobal(a.DocComment);
     WriteAttributes(a.Attributes);
     WriteModifiers(a.Modifiers, a.OptionalCondition);
     WriteIdentifier(a.Name);
     WriteExpressions(a.UsingBlocks);
     WriteBlockMembers(a.Members);
 }
Example #2
0
 public static void Serialize(this AstBlock block, string filename, AstSerializationFlags flags = 0)
 {
     using (var w = AstWriter.Create(block.Name.Source.Package, filename, flags))
         w.WriteBlock(block);
 }