language-objc-0.4.2.5: Analysis and generation of Objective C code

Portabilityghc
Stabilityalpha
Maintainerjwlato@gmail.com
Safe HaskellNone

Language.ObjC.Analysis.AstAnalysis

Contents

Description

Analyse the parse tree

Traverses the AST, analyses declarations and invokes handlers.

Synopsis

Top-level analysis

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 occurred (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

analyseDecl :: MonadTrav m => Bool -> CDecl -> m ()Source

Analyse a declaration other than a function definition

Building blocks for additional analyses

Type checking

data ExprSide Source

Constructors

LValue 
RValue 

Instances

tStmt :: MonadTrav m => [StmtCtx] -> CStat -> m TypeSource

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.