Browse Source

Fixed driver code to use source file options for parsing.

pull/291/head
triton 12 years ago
parent
commit
ce2f7f70b4
  1. 7
      src/Core/Parser/Parser.cs
  2. 2
      src/Generator/Driver.cs

7
src/Core/Parser/Parser.cs

@ -48,8 +48,9 @@ namespace CppSharp @@ -48,8 +48,9 @@ namespace CppSharp
/// <summary>
/// Parses a C++ source file to a translation unit.
/// </summary>
public ParserResult ParseSourceFile(SourceFile file, ParserOptions options)
public ParserResult ParseSourceFile(SourceFile file)
{
var options = file.Options;
options.ASTContext = ASTContext;
options.FileName = file.Path;
@ -62,13 +63,13 @@ namespace CppSharp @@ -62,13 +63,13 @@ namespace CppSharp
/// <summary>
/// Parses the project source files.
/// </summary>
public void ParseProject(Project project, ParserOptions options)
public void ParseProject(Project project)
{
// TODO: Search for cached AST trees on disk
// TODO: Do multi-threaded parsing of source files
foreach (var source in project.Sources)
ParseSourceFile(source, options);
ParseSourceFile(source);
}
/// <summary>

2
src/Generator/Driver.cs

@ -170,7 +170,7 @@ namespace CppSharp @@ -170,7 +170,7 @@ namespace CppSharp
var parser = new ClangParser(new Parser.AST.ASTContext());
parser.SourceParsed += OnSourceFileParsed;
parser.ParseProject(Project, Options);
parser.ParseProject(Project);
TargetInfo = parser.GetTargetInfo(Options);

Loading…
Cancel
Save