module Clang (
parseSourceFile
, FFI.CursorList
, getChildren
, getDescendants
, getDeclarations
, getReferences
, getDeclarationsAndReferences
, FFI.ParentedCursorList
, getParentedDescendants
, getParentedDeclarations
, getParentedReferences
, getParentedDeclarationsAndReferences
, FFI.Inclusion(..)
, FFI.InclusionList
, getInclusions
, ClangT
, Clang
, ClangBase
, ClangValue(..)
, ClangValueList(..)
, clangScope
, FFI.AvailabilityKind(..)
, FFI.CursorKind(..)
, FFI.LinkageKind(..)
, FFI.LanguageKind(..)
, FFI.Cursor
, FFI.CursorSet
, FFI.ParentedCursor(..)
, FFI.ObjCPropertyAttrKind(..)
, FFI.ObjCDeclQualifierKind(..)
, FFI.NameRefFlags(..)
, FFI.Version(..)
, FFI.PlatformAvailability(..)
, FFI.PlatformAvailabilityInfo(..)
, FFI.Diagnostic
, FFI.DiagnosticSet
, FFI.File
, FFI.Remapping
, FFI.SourceLocation
, FFI.SourceRange
, FFI.ClangString
, FFI.Token
, FFI.TokenKind(..)
, FFI.Index
, FFI.TranslationUnit
, FFI.UnsavedFile
, FFI.Module (..)
, FFI.Type
, FFI.TypeKind(..)
, FFI.CallingConv(..)
, FFI.CXXAccessSpecifier(..)
, FFI.TypeLayoutError(..)
, FFI.RefQualifierKind(..)
) where
import qualified Data.Vector as DV
import qualified Clang.Internal.FFI as FFI
import qualified Clang.Index as Index
import Clang.Internal.Monad
import qualified Clang.TranslationUnit as TU
parseSourceFile :: ClangBase m
=> FilePath
-> [String]
-> (forall s. FFI.TranslationUnit s -> ClangT s m a)
-> m (Maybe a)
parseSourceFile path args f =
Index.withNew False False $ \index ->
TU.withParsed index (Just path) args DV.empty [] f
getChildren :: ClangBase m => FFI.Cursor s' -> ClangT s m (FFI.CursorList s)
getChildren = FFI.getChildren
getDescendants :: ClangBase m => FFI.Cursor s' -> ClangT s m (FFI.CursorList s)
getDescendants = FFI.getDescendants
getParentedDescendants :: ClangBase m => FFI.Cursor s' -> ClangT s m (FFI.ParentedCursorList s)
getParentedDescendants = FFI.getParentedDescendants
getDeclarations :: ClangBase m => FFI.TranslationUnit s' -> ClangT s m (FFI.CursorList s)
getDeclarations = FFI.getDeclarations
getParentedDeclarations :: ClangBase m => FFI.TranslationUnit s'
-> ClangT s m (FFI.ParentedCursorList s)
getParentedDeclarations = FFI.getParentedDeclarations
getReferences :: ClangBase m => FFI.TranslationUnit s' -> ClangT s m (FFI.CursorList s)
getReferences = FFI.getReferences
getParentedReferences :: ClangBase m => FFI.TranslationUnit s'
-> ClangT s m (FFI.ParentedCursorList s)
getParentedReferences = FFI.getParentedReferences
getDeclarationsAndReferences :: ClangBase m => FFI.TranslationUnit s'
-> ClangT s m (FFI.CursorList s, FFI.CursorList s)
getDeclarationsAndReferences = FFI.getDeclarationsAndReferences
getParentedDeclarationsAndReferences :: ClangBase m => FFI.TranslationUnit s'
-> ClangT s m (FFI.ParentedCursorList s,
FFI.ParentedCursorList s)
getParentedDeclarationsAndReferences = FFI.getParentedDeclarationsAndReferences
getInclusions :: ClangBase m => FFI.TranslationUnit s' -> ClangT s m (FFI.InclusionList s)
getInclusions = FFI.getInclusions
type Clang s a = ClangT s IO a