| Portability | ghc |
|---|---|
| Stability | alpha |
| Maintainer | benedikt.huber@gmail.com |
Language.C.Analysis.AstAnalysis
Description
Analyse the parse tree
Traverses the AST, analyses declarations and invokes handlers.
- analyseAST :: MonadTrav m => CTranslUnit -> m GlobalDecls
- analyseExt :: MonadTrav m => CExtDecl -> m ()
- analyseFunDef :: MonadTrav m => CFunDef -> m ()
- analyseExtDecls :: MonadTrav m => CDecl -> m ()
Documentation
analyseAST :: MonadTrav m => CTranslUnit -> m GlobalDeclsSource
Analyse the given AST
analyseAST ast results in global declaration dictionaries.
If you want to perform specific actions on declarations or definitions, you may provide
callbacks in the MonadTrav m.
Returns the set of global declarations and definitions which where successfully translated.
It is the users responsibility to check whether any hard errors occured (runTrav does this for you).
analyseExt :: MonadTrav m => CExtDecl -> m ()Source
Analyse an top-level declaration
analyseFunDef :: MonadTrav m => CFunDef -> m ()Source
Analyse a function definition
analyseExtDecls :: MonadTrav m => CDecl -> m ()Source
Analyse a top-level declaration other than a function definition