Copyright | (c) roki 2019 |
---|---|
License | MIT |
Maintainer | falgon53@yahoo.co.jp |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
The Data type of variables and its utilities used in parsing
Documentation
The data type of a typedef tag
Function | The contypedefor of a typedef tag |
Instances
Eq a => Eq (Function a) Source # | |
Ord a => Ord (Function a) Source # | |
Defined in Htcc.Parser.ConstructionData.Scope.Function | |
Show a => Show (Function a) Source # | |
Generic (Function a) Source # | |
NFData a => NFData (Function a) Source # | |
Defined in Htcc.Parser.ConstructionData.Scope.Function | |
ManagedScope (Function i) Source # | |
type Rep (Function a) Source # | |
Defined in Htcc.Parser.ConstructionData.Scope.Function type Rep (Function a) = D1 ('MetaData "Function" "Htcc.Parser.ConstructionData.Scope.Function" "htcc-0.0.0.1-I8tHuOdNzco4DzUthNftqr" 'False) (C1 ('MetaCons "Function" 'PrefixI 'True) (S1 ('MetaSel ('Just "fntype") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StorageClass a)) :*: S1 ('MetaSel ('Just "fnDefined") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) |
add :: Num i => Bool -> StorageClass i -> TokenLC i -> Functions i -> Either (ASTError i) (Functions i) Source #
Given the flag (when that is added function, it is True
. otherwise False
), type, identifier token, and Functions
,
if the specified identifier already exists in the same scope,
return an error message and its location as a pair.
Otherwise, add a new tag to Functions
and return it.
If the token does not indicate an identifier, an error indicating internal compiler error is returned.