From ef337f5f7c88692dcea301e2450e6f84747aa74c Mon Sep 17 00:00:00 2001 From: codewitch honey crisis Date: Thu, 21 Nov 2019 05:30:57 -0800 Subject: [PATCH] Cleaned up generated PCK formatting slightly --- cfg/CfgDocument.cs | 3 ++- pckw/XbnfToPckTransform.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cfg/CfgDocument.cs b/cfg/CfgDocument.cs index a57b023..b8965fa 100644 --- a/cfg/CfgDocument.cs +++ b/cfg/CfgDocument.cs @@ -661,7 +661,7 @@ public override string ToString() { if (0 < attrSet.Value.Count) { - sb.Append(string.Concat(attrSet.Key, ":")); + sb.Append(string.Concat(attrSet.Key, ": ")); var delim = ""; for (int jc = attrSet.Value.Count, j = 0; j < jc; ++j) { @@ -671,6 +671,7 @@ public override string ToString() sb.AppendLine(); } } + sb.AppendLine(); for (int ic = Rules.Count, i = 0; i < ic; ++i) sb.AppendLine(Rules[i].ToString()); return sb.ToString(); diff --git a/pckw/XbnfToPckTransform.cs b/pckw/XbnfToPckTransform.cs index f4ff0df..6b7f1a4 100644 --- a/pckw/XbnfToPckTransform.cs +++ b/pckw/XbnfToPckTransform.cs @@ -20,7 +20,7 @@ public static void Transform(XbnfDocument document, TextWriter writer) syms.Add(p.Name); if (0 < p.Attributes.Count) { - writer.Write(string.Concat(p.Name, ":")); + writer.Write(string.Concat(p.Name, ": ")); var delim = ""; for (int jc = p.Attributes.Count, j = 0; j < jc; ++j) { @@ -30,6 +30,7 @@ public static void Transform(XbnfDocument document, TextWriter writer) writer.WriteLine(); } } + writer.WriteLine(); // use a list dictionary to keep these in order var tmap = new ListDictionary(); var attrSets = new Dictionary();