Copyright | (c) [1995..1999] Manuel M. T. Chakravarty (c) 2008 Benedikt Huber (stripped radically) |
---|---|
License | BSD-style |
Maintainer | benedikt.huber@gmail.com |
Stability | experimental |
Portability | ghc |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Language.C.Data.Node
Description
source position and unqiue name
Synopsis
- data NodeInfo
- undefNode :: NodeInfo
- isUndefNode :: NodeInfo -> Bool
- mkNodeInfoOnlyPos :: Position -> NodeInfo
- mkNodeInfoPosLen :: Position -> PosLength -> NodeInfo
- mkNodeInfo :: Position -> Name -> NodeInfo
- mkNodeInfo' :: Position -> PosLength -> Name -> NodeInfo
- internalNode :: NodeInfo
- class CNode a where
- fileOfNode :: CNode a => a -> Maybe FilePath
- posOfNode :: NodeInfo -> Position
- nameOfNode :: NodeInfo -> Maybe Name
- getLastTokenPos :: NodeInfo -> PosLength
- lengthOfNode :: NodeInfo -> Maybe Int
- eqByName :: CNode a => a -> a -> Bool
Documentation
Parsed entity attribute
Instances
Data NodeInfo Source # | |
Defined in Language.C.Data.Node Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NodeInfo -> c NodeInfo gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NodeInfo toConstr :: NodeInfo -> Constr dataTypeOf :: NodeInfo -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NodeInfo) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NodeInfo) gmapT :: (forall b. Data b => b -> b) -> NodeInfo -> NodeInfo gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NodeInfo -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NodeInfo -> r gmapQ :: (forall d. Data d => d -> u) -> NodeInfo -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> NodeInfo -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> NodeInfo -> m NodeInfo gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NodeInfo -> m NodeInfo gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NodeInfo -> m NodeInfo | |
Generic NodeInfo Source # | |
Show NodeInfo Source # | |
NFData NodeInfo Source # | |
Defined in Language.C.Data.Node | |
Eq NodeInfo Source # | |
Ord NodeInfo Source # | |
Defined in Language.C.Data.Node | |
CNode NodeInfo Source # | |
Pos NodeInfo Source # | |
Pretty CAlignSpec Source # | |
Defined in Language.C.Pretty | |
Pretty CArrSize Source # | |
Defined in Language.C.Pretty | |
Pretty CAsmOperand Source # | |
Defined in Language.C.Pretty | |
Pretty CAsmStmt Source # | |
Defined in Language.C.Pretty | |
Pretty CAttr Source # | |
Defined in Language.C.Pretty | |
Pretty CBlockItem Source # | |
Defined in Language.C.Pretty | |
Pretty CBuiltin Source # | |
Defined in Language.C.Pretty | |
Pretty CConst Source # | |
Defined in Language.C.Pretty | |
Pretty CDecl Source # | |
Defined in Language.C.Pretty | |
Pretty CDeclSpec Source # | |
Defined in Language.C.Pretty | |
Pretty CDeclr Source # | |
Defined in Language.C.Pretty | |
Pretty CDesignator Source # | |
Defined in Language.C.Pretty | |
Pretty CEnum Source # | |
Defined in Language.C.Pretty | |
Pretty CExpr Source # | |
Defined in Language.C.Pretty | |
Pretty CExtDecl Source # | |
Defined in Language.C.Pretty | |
Pretty CFunDef Source # | |
Defined in Language.C.Pretty | |
Pretty CFunSpec Source # | |
Defined in Language.C.Pretty | |
Pretty CInit Source # | |
Defined in Language.C.Pretty | |
Pretty CStat Source # | |
Defined in Language.C.Pretty | |
Pretty CStorageSpec Source # | |
Defined in Language.C.Pretty | |
Pretty CStrLit Source # | |
Defined in Language.C.Pretty | |
Pretty CStructUnion Source # | |
Defined in Language.C.Pretty | |
Pretty CTranslUnit Source # | |
Defined in Language.C.Pretty | |
Pretty CTypeQual Source # | |
Defined in Language.C.Pretty | |
Pretty CTypeSpec Source # | |
Defined in Language.C.Pretty | |
type Rep NodeInfo Source # | |
Defined in Language.C.Data.Node type Rep NodeInfo = D1 ('MetaData "NodeInfo" "Language.C.Data.Node" "language-c-0.9.2-2qlksbsQow9Gzp8WTwI6fa" 'False) (C1 ('MetaCons "OnlyPos" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Position) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 PosLength)) :+: C1 ('MetaCons "NodeInfo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Position) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 PosLength) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Name)))) |
isUndefNode :: NodeInfo -> Bool Source #
return True if the node carries neither name nor positional information
mkNodeInfoOnlyPos :: Position -> NodeInfo Source #
| Given only a source position, create a new node attribute
mkNodeInfoPosLen :: Position -> PosLength -> NodeInfo Source #
Given a source position and the position and length of the last token, create a new node attribute
mkNodeInfo :: Position -> Name -> NodeInfo Source #
Given a source position and a unique name, create a new attribute identifier
mkNodeInfo' :: Position -> PosLength -> Name -> NodeInfo Source #
Given a source position, the position and length of the last token and a unique name, create a new attribute identifier. Strict in
internalNode :: NodeInfo Source #
Deprecated: use undefNode instead
a class for convenient access to the attributes of an attributed object
Instances
fileOfNode :: CNode a => a -> Maybe FilePath Source #
nameOfNode :: NodeInfo -> Maybe Name Source #
getLastTokenPos :: NodeInfo -> PosLength Source #
get the position and length of the last token
lengthOfNode :: NodeInfo -> Maybe Int Source #
get the number of characters an AST node spans