Renamed "Parser" to "XmlParser" to not conflict with the command line parser.

This commit is contained in:
Jarl Gullberg 2017-07-16 15:40:22 +02:00
parent aa3c256625
commit eaff349201
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23
4 changed files with 8 additions and 8 deletions

View 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,}$",

View 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">

View 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).

View file

@ -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; }