diff --git a/src/Generator/Options.cs b/src/Generator/Options.cs index 61365343..69d46fb0 100644 --- a/src/Generator/Options.cs +++ b/src/Generator/Options.cs @@ -5,6 +5,11 @@ using System.Text; using CppSharp.AST; using CppSharp.Generators; +#if !OLD_PARSER +using CppSharp.Parser; +using CppAbi = CppSharp.Parser.AST.CppAbi; +#endif + namespace CppSharp { public class DriverOptions diff --git a/src/Generator/Passes/CleanUnitPass.cs b/src/Generator/Passes/CleanUnitPass.cs index 62240f3e..f7e08749 100644 --- a/src/Generator/Passes/CleanUnitPass.cs +++ b/src/Generator/Passes/CleanUnitPass.cs @@ -25,7 +25,7 @@ namespace CppSharp.Passes var includePath = filePath; var shortestIncludePath = filePath; - foreach (var path in DriverOptions.IncludeDirs) + foreach (var path in DriverOptions.Parser.IncludeDirs) { int idx = filePath.IndexOf(path, System.StringComparison.Ordinal); if (idx == -1) continue; diff --git a/src/Generator/Passes/GenerateAbstractImplementationsPass.cs b/src/Generator/Passes/GenerateAbstractImplementationsPass.cs index 81e2eb4a..6140800f 100644 --- a/src/Generator/Passes/GenerateAbstractImplementationsPass.cs +++ b/src/Generator/Passes/GenerateAbstractImplementationsPass.cs @@ -2,6 +2,10 @@ using System.Linq; using CppSharp.AST; +#if !OLD_PARSER +using CppAbi = CppSharp.Parser.AST.CppAbi; +#endif + namespace CppSharp.Passes { /// @@ -125,7 +129,7 @@ namespace CppSharp.Passes private void FillVTable(Class @class, IList abstractMethods, Class internalImplementation) { - switch (Driver.Options.Abi) + switch (Driver.Options.Parser.Abi) { case CppAbi.Microsoft: CreateVTableMS(@class, abstractMethods, internalImplementation); diff --git a/src/Generator/Passes/GenerateInlinesCodePass.cs b/src/Generator/Passes/GenerateInlinesCodePass.cs index 9d00b4eb..a5cc9846 100644 --- a/src/Generator/Passes/GenerateInlinesCodePass.cs +++ b/src/Generator/Passes/GenerateInlinesCodePass.cs @@ -3,6 +3,10 @@ using System.IO; using System.Text; using CppSharp.AST; +#if !OLD_PARSER +using CppAbi = CppSharp.Parser.AST.CppAbi; +#endif + namespace CppSharp.Passes { public class GenerateInlinesCodePass : TranslationUnitPass @@ -33,7 +37,7 @@ namespace CppSharp.Passes private void WriteInlinedSymbols() { - switch (Driver.Options.Abi) + switch (Driver.Options.Parser.Abi) { case CppAbi.Microsoft: var defBuilder = new StringBuilder("EXPORTS\r\n"); diff --git a/src/Generator/Utils/TestsUtils.cs b/src/Generator/Utils/TestsUtils.cs index c28b9394..df904213 100644 --- a/src/Generator/Utils/TestsUtils.cs +++ b/src/Generator/Utils/TestsUtils.cs @@ -37,7 +37,7 @@ namespace CppSharp.Utils options.SharedLibraryName += ".dll"; var path = Path.GetFullPath("../../../tests/" + name); - options.IncludeDirs.Add(path); + options.Parser.IncludeDirs.Add(path); if (!Directory.Exists(path)) {