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

Description

The Data type of variables and its utilities used in parsing

Synopsis

Documentation

class ManagedScope a where Source #

Type classes common to concepts managed in scope

Methods

lookup :: Text -> Map Text a -> Maybe a Source #

lookup searches for something managed by the scope by the specified Text from a.

fallBack :: Map Text a -> Map Text a -> Map Text a Source #

Organize a list state after scoping.

initial :: Map Text a Source #

Helper function representing an empty something managed by the scope

Instances

Instances details
ManagedScope (LVar a) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Var

Methods

lookup :: Text -> Map Text (LVar a) -> Maybe (LVar a) Source #

fallBack :: Map Text (LVar a) -> Map Text (LVar a) -> Map Text (LVar a) Source #

initial :: Map Text (LVar a) Source #

ManagedScope (GVar i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Var

Methods

lookup :: Text -> Map Text (GVar i) -> Maybe (GVar i) Source #

fallBack :: Map Text (GVar i) -> Map Text (GVar i) -> Map Text (GVar i) Source #

initial :: Map Text (GVar i) Source #

ManagedScope (Typedef i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Typedef

ManagedScope (Tag i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Tag

Methods

lookup :: Text -> Map Text (Tag i) -> Maybe (Tag i) Source #

fallBack :: Map Text (Tag i) -> Map Text (Tag i) -> Map Text (Tag i) Source #

initial :: Map Text (Tag i) Source #

ManagedScope (Function i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Function

ManagedScope (Enumerator i) Source # 
Instance details

Defined in Htcc.Parser.ConstructionData.Scope.Enumerator

type ASTError i = (Text, TokenLC i) Source #

The type to be used if an error occurs during AST construction.