public CXSourceLocation GetLocation(CXTranslationUnit translationUnit) => clang.getTokenLocation(translationUnit, this);
public CXString GetSpelling(CXTranslationUnit translationUnit) => clang.getTokenSpelling(translationUnit, this);
public CXSourceRange GetExtent(CXTranslationUnit translationUnit) => clang.getTokenExtent(translationUnit, this);
public bool TryIndexTranslationUnit(CXClientData clientData, ReadOnlySpan <IndexerCallbacks> indexCallbacks, CXIndexOptFlags indexOptions, CXTranslationUnit tu) { fixed(IndexerCallbacks *pIndexCallbacks = indexCallbacks) { return(clang.indexTranslationUnit(this, clientData, pIndexCallbacks, (uint)indexCallbacks.Length, (uint)indexOptions, tu) == 0); } }
public bool TryIndexSourceFileFullArgv(CXClientData clientData, ReadOnlySpan <IndexerCallbacks> indexCallbacks, CXIndexOptFlags indexOptions, string sourceFilename, ReadOnlySpan <string> commandLineArgs, ReadOnlySpan <CXUnsavedFile> unsavedFiles, out CXTranslationUnit tu, CXTranslationUnit_Flags tuOptions) { using var marshaledSourceFilename = new MarshaledString(sourceFilename); using var marshaledCommandLineArgs = new MarshaledStringArray(commandLineArgs); fixed(IndexerCallbacks *pIndexCallbacks = indexCallbacks) fixed(CXUnsavedFile * pUnsavedFiles = unsavedFiles) fixed(CXTranslationUnit * pTU = &tu) { var pCommandLineArgs = stackalloc sbyte *[commandLineArgs.Length]; marshaledCommandLineArgs.Fill(pCommandLineArgs); return(clang.indexSourceFileFullArgv(this, clientData, pIndexCallbacks, (uint)indexCallbacks.Length, (uint)indexOptions, marshaledSourceFilename, pCommandLineArgs, commandLineArgs.Length, pUnsavedFiles, (uint)unsavedFiles.Length, (CXTranslationUnitImpl **)pTU, (uint)tuOptions) == 0); } }
public CXFile GetTopLevelHeader(CXTranslationUnit translationUnit, uint index) => (CXFile)clang.Module_getTopLevelHeader(translationUnit, this, index);
public uint GetNumTopLevelHeaders(CXTranslationUnit translationUnit) => clang.Module_getNumTopLevelHeaders(translationUnit, this);