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

Portability | ghc
Stability | experimental
Maintainer | benedikt.huber@gmail.com
Safe Haskell | None

Language.C.Data.Node

Description

source position and unqiue name

Synopsis

- data NodeInfo
  - = OnlyPos Position
  - | NodeInfo Position Name
- internalNode :: NodeInfo
- mkNodeInfoOnlyPos :: Position -> NodeInfo
- mkNodeInfo :: Position -> Name -> NodeInfo
- class CNode a where
  - nodeInfo :: a -> NodeInfo
- fileOfNode :: CNode a => a -> FilePath
- posOfNode :: NodeInfo -> Position
- nameOfNode :: NodeInfo -> Maybe Name
- eqByName :: CNode a => a -> a -> Bool

# Documentation

data NodeInfo

Parsed entity attribute

Constructors

OnlyPos Position |
NodeInfo Position Name |

Instances

Eq NodeInfo |
Data NodeInfo |
Ord NodeInfo |
Read NodeInfo |
Show NodeInfo |
Typeable NodeInfo |
Pos NodeInfo |
CNode NodeInfo |

internalNode :: NodeInfo

mkNodeInfoOnlyPos :: Position -> NodeInfo

Given only a source position, create a new attribute identifier

mkNodeInfo :: Position -> Name -> NodeInfo

Given a source position and a unique name, create a new attribute identifier

class CNode a where

a class for convenient access to the attributes of an attributed object

Methods

nodeInfo :: a -> NodeInfo

Instances

CNode NodeInfo |
CNode Ident |
CNode CStrLit |
CNode CConst |
CNode CBuiltin |
CNode CExpr |
CNode CAttr |
CNode CDesignator |
CNode CInit |
CNode CEnum |
CNode CStructUnion |
CNode CTypeQual |
CNode CTypeSpec |
CNode CStorageSpec |
CNode CDeclSpec |
CNode CBlockItem |
CNode CAsmOperand |
CNode CAsmStmt |
CNode CStat |
CNode CDerivedDeclr |
CNode CDeclr |
CNode CDecl |
CNode CFunDef |
CNode CExtDecl |
CNode CTranslUnit |
CNode Attr |
CNode Enumerator |
CNode EnumType |
CNode CompType |
CNode EnumTypeRef |
CNode CompTypeRef |
CNode TypeDefRef |
CNode TypeDef |
CNode MemberDecl |
CNode ParamDecl |
CNode FunDef |
CNode ObjDef |
CNode Decl |
CNode DeclEvent |
CNode IdentDecl |
CNode TagDef |
CNode TagFwdDecl |
(CNode a, CNode b) => CNode (Either a b) |

fileOfNode :: CNode a => a -> FilePath

posOfNode :: NodeInfo -> Position

nameOfNode :: NodeInfo -> Maybe Name

eqByName :: CNode a => a -> a -> Bool

equality by name