hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
IRStructDefinition::Builder Struct Reference

#include <IR.h>

Public Member Functions

 Builder ()=default
 
BuildersetName (const yoi::wstr &name)
 
BuilderaddField (const yoi::wstr &fieldName, const std::shared_ptr< IRValueType > &fieldType)
 
BuilderaddMethod (const yoi::wstr &methodName, yoi::indexT index)
 
BuildersetStoredTemplateArgs (const yoi::vec< yoi::wstr > &paramNames, const yoi::vec< std::shared_ptr< IRValueType > > &args)
 
BuilderaddTemplateMethodDecl (const yoi::wstr &name, yoi::structDefInnerPair *decl)
 
BuilderaddTemplateMethodDef (const yoi::wstr &name, yoi::implInnerPair *def)
 
std::shared_ptr< IRStructDefinitionyield ()
 

Public Attributes

yoi::wstr name
 
std::map< yoi::wstr, nameInfonameIndexMap
 
yoi::vec< std::shared_ptr< IRValueType > > fieldTypes
 
yoi::vec< yoi::wstrtemplateParamNames
 
yoi::vec< std::shared_ptr< IRValueType > > storedTemplateArgs
 
std::map< yoi::wstr, yoi::structDefInnerPair * > templateMethodDecls
 
std::map< yoi::wstr, yoi::implInnerPair * > templateMethodDefs
 

Detailed Description

Definition at line 637 of file IR.h.

Constructor & Destructor Documentation

◆ Builder()

Builder ( )
default

Member Function Documentation

◆ addField()

IRStructDefinition::Builder & addField ( const yoi::wstr fieldName,
const std::shared_ptr< IRValueType > &  fieldType 
)

◆ addMethod()

IRStructDefinition::Builder & addMethod ( const yoi::wstr methodName,
yoi::indexT  index 
)

◆ addTemplateMethodDecl()

IRStructDefinition::Builder & addTemplateMethodDecl ( const yoi::wstr name,
yoi::structDefInnerPair decl 
)

Definition at line 811 of file IR.cpp.

References IRStructDefinition::name, and IRStructDefinition::templateMethodDecls.

Referenced by visitor::specializeStructTemplate(), and visitor::visit().

Here is the caller graph for this function:

◆ addTemplateMethodDef()

IRStructDefinition::Builder & addTemplateMethodDef ( const yoi::wstr name,
yoi::implInnerPair def 
)

Definition at line 816 of file IR.cpp.

References IRStructDefinition::name, and IRStructDefinition::templateMethodDefs.

Referenced by visitor::specializeStructTemplate().

Here is the caller graph for this function:

◆ setName()

◆ setStoredTemplateArgs()

IRStructDefinition::Builder & setStoredTemplateArgs ( const yoi::vec< yoi::wstr > &  paramNames,
const yoi::vec< std::shared_ptr< IRValueType > > &  args 
)

Definition at line 804 of file IR.cpp.

References IRStructDefinition::storedTemplateArgs, and IRStructDefinition::templateParamNames.

Referenced by visitor::specializeStructTemplate().

Here is the caller graph for this function:

◆ yield()

Member Data Documentation

◆ fieldTypes

yoi::vec<std::shared_ptr<IRValueType> > fieldTypes

Definition at line 640 of file IR.h.

◆ name

yoi::wstr name

Definition at line 638 of file IR.h.

Referenced by IRStructDefinition::Builder::setName().

◆ nameIndexMap

std::map<yoi::wstr, nameInfo> nameIndexMap

Definition at line 639 of file IR.h.

◆ storedTemplateArgs

yoi::vec<std::shared_ptr<IRValueType> > storedTemplateArgs

Definition at line 645 of file IR.h.

◆ templateMethodDecls

std::map<yoi::wstr, yoi::structDefInnerPair *> templateMethodDecls

Definition at line 646 of file IR.h.

◆ templateMethodDefs

std::map<yoi::wstr, yoi::implInnerPair *> templateMethodDefs

Definition at line 647 of file IR.h.

◆ templateParamNames

yoi::vec<yoi::wstr> templateParamNames

Definition at line 644 of file IR.h.


The documentation for this struct was generated from the following files: