sutori-0.2.4: Sutori language compiler

Safe HaskellSafe
LanguageHaskell2010

Sutori.SymTable.Symbol

Description

 

Synopsis

Documentation

class SutSymbol a => ParametricSymbol a where Source #

Represents a symbol which also has some parameters

Minimal complete definition

symParams

Methods

symParams Source #

Arguments

:: a 
-> [SutParam]

The list of parameters (in order)

class SutSymbol a => TypedSymbol a where Source #

Represents a symbol with a type

Minimal complete definition

symType

Methods

symType Source #

Arguments

:: a 
-> SutTypeID

The type of the symbol

class SutSymbol a => ASTSymbol a where Source #

Represents a symbol that holds an AST

Minimal complete definition

symAST

Methods

symAST Source #

Arguments

:: a 
-> SutAST

The AST held by the symbol

symPreAST Source #

Arguments

:: a 
-> SutAST

An optional (empty by default) AST (hidden, preppended)

class SutSymbol a => OffsetSymbol a where Source #

Represents a symbol that _may_ hold an offset

Minimal complete definition

symOffset

Methods

symOffset :: a -> Offset Source #

type Scope = Int Source #

A Scope is just a number uniquely representing a scope (NOT a level, but an ID)

data SutParam Source #

A SutParam represents a function parameter, and it has a kind, type and ID

Constructors

SutParam 

Fields

Instances

data SymPerson Source #

A person who may do things in the story

Constructors

SymPerson SutID Scope 

data SymType Source #

A reference to a (now named) type

paramByValue :: SutTypeID -> SutID -> SutParam Source #

Helper to abstract the True/False isRef field

paramByRef :: SutTypeID -> SutID -> SutParam Source #

Helper to abstract the True/False isRef field