|
| Language.C.Data | | Portability | ghc | | Stability | experimental | | Maintainer | benedikt.huber@gmail.com |
|
|
|
|
|
| Description |
| Common data types for Language.C: Identifiers, unique names, source code locations,
ast node attributes and extensible errors.
|
|
| Synopsis |
|
|
|
|
| Input stream
|
|
| module Language.C.Data.InputStream |
|
| 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 | |
|
|
|
| Return true if the struct/union/enum reference is anonymous.
|
|
|
|
|
|
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.
|
|
|
| string of an identifier
|
|
|
| returns an internal identifier (has internal position and no unique name)
|
|
|
| return True if the given identifier is internal
|
|
|
| returns a builtin identifier (has builtin position and no unique name)
|
|
| Unqiue names
|
|
|
| Name is a unique identifier
| | Constructors | |
|
|
|
| return an infinite stream of Names starting with nameId 0
|
|
| Source code positions
|
|
|
| uniform representation of source file positions; the order of the arguments
is important as it leads to the desired ordering of source positions
| | Constructors | |
|
|
|
| class of type which aggregate a source code location
| | | Methods | |
|
|
|
| initialize a Position to the start of the translation unit starting in the given file
|
|
|
| get the source file of the specified position. Fails unless isSourcePos pos.
|
|
|
| get the line number of the specified position. Fails unless isSourcePos pos
|
|
|
| get the column of the specified position. Fails unless isSourcePos pos
|
|
|
| no position (for unknown position information)
|
|
|
| position attached to built-in objects
|
|
|
| position used for internal errors
|
|
|
| returns True if the given position refers to an actual source file
|
|
|
| returns True if the given position refers to a builtin definition
|
|
|
| returns True if the given position is internal
|
|
| Syntax tree nodes
|
|
|
| Parsed entity attribute
| | Constructors | |
|
|
|
| a class for convenient access to the attributes of an attributed object
| | | Methods | |
|
|
|
|
|
|
|
|
|
|
|
| Given only a source position, create a new attribute identifier
|
|
|
| Given a source position and a unique name, create a new attribute
identifier
|
|
| Extensible errors
|
|
| module Language.C.Data.Error |
|
| Produced by Haddock version 2.6.0 |