mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-02 10:01:08 +00:00
Avoid singleton Settings; make internal
Utilities.Keywords now accepts an explicit parameter, instead of accessing Settings directly. This allows us to use multiple configurations in the same process. Additionally, the Utilities class is no longer public (the Bind project is not meant to be consumed as a dll.)
This commit is contained in:
parent
f00c2e0527
commit
f000bda891
|
@ -67,7 +67,7 @@ namespace Bind
|
|||
|
||||
#endregion
|
||||
|
||||
public static class Utilities
|
||||
static class Utilities
|
||||
{
|
||||
public static readonly char[] Separators = { ' ', '\n', ',', '(', ')', ';', '#' };
|
||||
public static Regex Extensions { get; private set; }
|
||||
|
@ -117,17 +117,14 @@ namespace Bind
|
|||
|
||||
#region Keywords
|
||||
|
||||
public static List<string> Keywords
|
||||
public static List<string> Keywords(GeneratorLanguage language)
|
||||
{
|
||||
get
|
||||
switch (language)
|
||||
{
|
||||
switch (Settings.Language)
|
||||
{
|
||||
case GeneratorLanguage.CSharp: return CSharpKeywords;
|
||||
case GeneratorLanguage.Cpp: return CppKeywords;
|
||||
case GeneratorLanguage.Java: return JavaKeywords;
|
||||
default: throw new NotImplementedException();
|
||||
}
|
||||
case GeneratorLanguage.CSharp: return CSharpKeywords;
|
||||
case GeneratorLanguage.Cpp: return CppKeywords;
|
||||
case GeneratorLanguage.Java: return JavaKeywords;
|
||||
default: throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue