Renamed "Parser" to "XmlParser" to not conflict with the command line parser.
authorJarl Gullberg <jarl.gullberg@gmail.com>
Sun, 16 Jul 2017 13:40:22 +0000 (15:40 +0200)
committerJarl Gullberg <jarl.gullberg@gmail.com>
Sun, 16 Jul 2017 13:40:22 +0000 (15:40 +0200)
src/Generator.Converter/GLXmlParser.cs
src/Generator.Converter/Generator.Convert.csproj
src/Generator.Converter/Main.cs
src/Generator.Converter/XmlParser.cs [moved from src/Generator.Converter/Parser.cs with 99% similarity]

index ccd6b2b..ef3cf7b 100644 (file)
@@ -40,7 +40,7 @@ namespace OpenTK.Convert
         }
     }
 
-    class GLXmlParser : Parser
+    class GLXmlParser : XmlParser
     {
         static readonly Regex ExtensionRegex = new Regex(
             @"3DFX|(?!(?<=[1-4])D)[A-Z]{2,}$",
index f0cd3f6..e4729b9 100644 (file)
@@ -96,7 +96,7 @@
       <SubType>Code</SubType>
     </Compile>
     <Compile Include="Options.cs" />
-    <Compile Include="Parser.cs">
+    <Compile Include="XmlParser.cs">
       <SubType>Code</SubType>
     </Compile>
     <Compile Include="Properties\AssemblyInfo.cs">
index d49af28..8835302 100644 (file)
@@ -66,15 +66,15 @@ namespace OpenTK.Convert
 
         static void Main(string[] args)
         {
-            CommandLine.Parser.Default.ParseArguments<Options>(args)
+            Parser.Default.ParseArguments<Options>(args)
                 .WithParsed(result => CLIOptions = result)
                 .WithNotParsed(error => Environment.Exit(-1));
 
             try
             {
-                Parser parser = new GLXmlParser { Prefix = CLIOptions.Prefix };
+                XmlParser xmlParser = new GLXmlParser { Prefix = CLIOptions.Prefix };
 
-                var sigs = CLIOptions.InputFiles.Select(h => parser.Parse(h)).ToList();
+                var sigs = CLIOptions.InputFiles.Select(h => xmlParser.Parse(h)).ToList();
 
                 // Merge any duplicate enum entries (in case an enum is declared
                 // in multiple files with different entries in each file).
similarity index 99%
rename from src/Generator.Converter/Parser.cs
rename to src/Generator.Converter/XmlParser.cs
index 0bf5c89..4b18e2d 100644 (file)
@@ -8,10 +8,10 @@
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -29,7 +29,7 @@ using System.Xml.Linq;
 namespace OpenTK.Convert
 {
     // The base class for a parser.
-    abstract class Parser
+    abstract class XmlParser
     {
         // Defines a prefix that should be removed from methods and tokens in the XML files, e.g. "gl", "cl", etc.
         public string Prefix { get; set; }