mirror of https://github.com/mono/CppSharp.git
c-sharpdotnetmonobindingsbridgecclangcpluspluscppsharpglueinteropparserparsingpinvokeswigsyntax-treevisitorsxamarinxamarin-bindings
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
933 B
40 lines
933 B
/************************************************************************ |
|
* |
|
* CppSharp |
|
* Licensed under the simplified BSD license. All rights reserved. |
|
* |
|
************************************************************************/ |
|
|
|
#include "Parser.h" |
|
#include "Interop.h" |
|
|
|
namespace CppSharp { namespace Parser { |
|
|
|
public ref class ClangParser |
|
{ |
|
public: |
|
|
|
static ParserResult^ ParseHeader(ParserOptions^ Opts) |
|
{ |
|
if (!Opts->FileName) return nullptr; |
|
|
|
using namespace clix; |
|
std::string File = marshalString<E_UTF8>(Opts->FileName); |
|
|
|
::Parser parser(Opts); |
|
return parser.ParseHeader(File); |
|
} |
|
|
|
static ParserResult^ ParseLibrary(ParserOptions^ Opts) |
|
{ |
|
if (!Opts->FileName) return nullptr; |
|
|
|
using namespace clix; |
|
std::string File = marshalString<E_UTF8>(Opts->FileName); |
|
|
|
::Parser parser(Opts); |
|
return parser.ParseLibrary(File); |
|
} |
|
}; |
|
|
|
} } |