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.Enumerator

Description

The Data type of variables and its utilities used in parsing

Synopsis

Documentation

data Enumerator i Source #

The data type of a enumerator

Constructors

Enumerator 

Fields

Instances

Instances details
Treealizable Enumerator Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Enumerator

Methods

treealize :: Enumerator i -> ATree i Source #

Eq i => Eq (Enumerator i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Enumerator

Methods

(==) :: Enumerator i -> Enumerator i -> Bool #

(/=) :: Enumerator i -> Enumerator i -> Bool #

Ord i => Ord (Enumerator i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Enumerator

Show i => Show (Enumerator i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Enumerator

Generic (Enumerator i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Enumerator

Associated Types

type Rep (Enumerator i) :: Type -> Type #

Methods

from :: Enumerator i -> Rep (Enumerator i) x #

to :: Rep (Enumerator i) x -> Enumerator i #

NFData i => NFData (Enumerator i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Enumerator

Methods

rnf :: Enumerator i -> () #

ManagedScope (Enumerator i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Enumerator

type Rep (Enumerator i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Enumerator

type Rep (Enumerator i) = D1 ('MetaData "Enumerator" "Htcc.Parser.ConstructionData.Scope.Enumerator" "htcc-0.0.0.1-I8tHuOdNzco4DzUthNftqr" 'False) (C1 ('MetaCons "Enumerator" 'PrefixI 'True) (S1 ('MetaSel ('Just "enVal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 i) :*: S1 ('MetaSel ('Just "enUnderlying") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StorageClass i))))

type Enumerators i = Map Text (Enumerator i) Source #

The typedefs data typedefs

add :: Num i => StorageClass i -> TokenLC i -> i -> Enumerators i -> Either (ASTError i) (Enumerators i) Source #

Given the flag (when that is added function, it is True. otherwise False), type, identifier token, and Enumerators, 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 Enumerators and return it. If the token does not indicate an identifier, an error indicating internal compiler error is returned.