Copyright | (c) [1995..1999] Manuel M. T. Chakravarty (c) 2008 Benedikt Huber |
---|---|
License | BSD-style |
Maintainer | benedikt.huber@gmail.com |
Stability | experimental |
Portability | ghc |
Safe Haskell | None |
Language | Haskell98 |
Language.C.Data.Ident
Description
- data Ident = Ident String !Int NodeInfo
- data SUERef
- isAnonymousRef :: SUERef -> Bool
- mkIdent :: Position -> String -> Name -> Ident
- builtinIdent :: String -> Ident
- internalIdent :: String -> Ident
- internalIdentAt :: Position -> String -> Ident
- isInternalIdent :: Ident -> Bool
- identToString :: Ident -> String
- sueRefToString :: SUERef -> String
- dumpIdent :: Ident -> String
Documentation
C identifiers
References uniquely determining a struct, union or enum type. Those are either identified by an string identifier, or by a unique name (anonymous types).
Constructors
AnonymousRef Name | |
NamedRef Ident |
isAnonymousRef :: SUERef -> Bool #
Return true if the struct/union/enum reference is anonymous.
mkIdent :: Position -> String -> Name -> Ident #
build an identifier from a string.
- only minimal error checking, e.g., the characters of the identifier are not checked for being alphanumerical only; the correct lexis of the identifier should be ensured by the caller, e.g., the scanner.
- for reasons of simplicity the complete lexeme is hashed.
builtinIdent :: String -> Ident #
returns a builtin identifier (has builtin position and no unique name)
internalIdent :: String -> Ident #
returns an internal identifier (has internal position and no unique name)
internalIdentAt :: Position -> String -> Ident #
return an internal identifier with position info
isInternalIdent :: Ident -> Bool #
return True
if the given identifier is internal
identToString :: Ident -> String #
string of an identifier
sueRefToString :: SUERef -> String #
string of a SUE ref (empty if anonymous)