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 ()
- analyseDecl :: MonadTrav m => Bool -> CDecl -> m ()
- analyseFunctionBody :: MonadTrav m => NodeInfo -> VarDecl -> CStat -> m Stmt
- defineParams :: MonadTrav m => NodeInfo -> VarDecl -> m ()
- tExpr :: MonadTrav m => [StmtCtx] -> ExprSide -> CExpr -> m Type
- data ExprSide
- tStmt :: MonadTrav m => [StmtCtx] -> CStat -> m Type
- data StmtCtx
- tDesignator :: MonadTrav m => Type -> [CDesignator] -> m Type
- defaultMD :: MachineDesc
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
Returns the set of global declarations and definitions which where successfully translated.
It is the users responsibility to check whether any hard errors occurred (
runTrav does this for you).
Analyse a declaration other than a function definition
Building blocks for additional analyses
Typecheck a statement, given a statement context. The type of a
statement is usually
void, but expression statements and blocks
can sometimes have other types.