language-c-0.3.0: Analysis and generation of C code

Portabilityghc
Stabilityalpha
Maintainerbenedikt.huber@gmail.com

Language.C.Analysis.AstAnalysis

Description

Analyse the parse tree

Traverses the AST, analyses declarations and invokes handlers.

Synopsis

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