htcc-0.0.0.1: The full scratch implementation of tiny C compiler (x86_64)
Copyright(c) roki 2019
LicenseMIT
Maintainerfalgon53@yahoo.co.jp
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Htcc.Parser.ConstructionData.Scope.Function

Description

The Data type of variables and its utilities used in parsing

Synopsis

Documentation

data Function a Source #

The data type of a typedef tag

Constructors

Function

The contypedefor of a typedef tag

Fields

Instances

Instances details
Eq a => Eq (Function a) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Function

Methods

(==) :: Function a -> Function a -> Bool #

(/=) :: Function a -> Function a -> Bool #

Ord a => Ord (Function a) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Function

Methods

compare :: Function a -> Function a -> Ordering #

(<) :: Function a -> Function a -> Bool #

(<=) :: Function a -> Function a -> Bool #

(>) :: Function a -> Function a -> Bool #

(>=) :: Function a -> Function a -> Bool #

max :: Function a -> Function a -> Function a #

min :: Function a -> Function a -> Function a #

Show a => Show (Function a) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Function

Methods

showsPrec :: Int -> Function a -> ShowS #

show :: Function a -> String #

showList :: [Function a] -> ShowS #

Generic (Function a) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Function

Associated Types

type Rep (Function a) :: Type -> Type #

Methods

from :: Function a -> Rep (Function a) x #

to :: Rep (Function a) x -> Function a #

NFData a => NFData (Function a) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Function

Methods

rnf :: Function a -> () #

ManagedScope (Function i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Function

type Rep (Function a) Source # 
Instance details

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)))

type Functions i = Map Text (Function i) Source #

The typedefs data typedefs

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.