|
hoshi-lang dev
Yet another programming language
|
#include <IR.h>
Classes | |
| struct | Builder |
| struct | nameInfo |
Public Member Functions | |
| IRStructDefinition (const yoi::wstr &name, const std::map< yoi::wstr, nameInfo > &nameIndexMap, const vec< std::shared_ptr< IRValueType > > &fieldTypes, const yoi::vec< yoi::wstr > &templateParamNames={}, const yoi::vec< std::shared_ptr< IRValueType > > &storedTemplateArgs={}, const std::map< yoi::wstr, yoi::structDefInnerPair * > &templateMethodDecls={}, const std::map< yoi::wstr, yoi::implInnerPair * > &templateMethodDefs={}) | |
| const nameInfo & | lookupName (const yoi::wstr &name) |
| Lookup a name in the struct definition, returning the index of the field or method and its type. | |
| yoi::wstr | to_string (yoi::indexT indent=0) |
Public Attributes | |
| yoi::wstr | name |
| yoi::vec< std::shared_ptr< IRValueType > > | fieldTypes |
| std::map< yoi::wstr, nameInfo > | nameIndexMap |
| yoi::vec< yoi::wstr > | templateParamNames |
| yoi::vec< std::shared_ptr< IRValueType > > | storedTemplateArgs |
| std::map< yoi::wstr, yoi::structDefInnerPair * > | templateMethodDecls |
| std::map< yoi::wstr, yoi::implInnerPair * > | templateMethodDefs |
| yoi::indexT | linkedModuleId |
| IRStructDefinition | ( | const yoi::wstr & | name, |
| const std::map< yoi::wstr, nameInfo > & | nameIndexMap, | ||
| const vec< std::shared_ptr< IRValueType > > & | fieldTypes, | ||
| const yoi::vec< yoi::wstr > & | templateParamNames = {}, |
||
| const yoi::vec< std::shared_ptr< IRValueType > > & | storedTemplateArgs = {}, |
||
| const std::map< yoi::wstr, yoi::structDefInnerPair * > & | templateMethodDecls = {}, |
||
| const std::map< yoi::wstr, yoi::implInnerPair * > & | templateMethodDefs = {} |
||
| ) |
| const IRStructDefinition::nameInfo & lookupName | ( | const yoi::wstr & | name | ) |
Lookup a name in the struct definition, returning the index of the field or method and its type.
| name | The name to lookup. |
| std::out_of_range | Throws if the name is not found in the struct definition. |
Definition at line 780 of file IR.cpp.
References IRStructDefinition::name, IRStructDefinition::nameIndexMap, and yoi::wstring2string().

| yoi::wstr to_string | ( | yoi::indexT | indent = 0 | ) |
Definition at line 768 of file IR.cpp.
References IRStructDefinition::nameInfo::field, IRStructDefinition::fieldTypes, IRStructDefinition::name, and IRStructDefinition::nameIndexMap.
| yoi::vec<std::shared_ptr<IRValueType> > fieldTypes |
Definition at line 603 of file IR.h.
Referenced by IRStructDefinition::Builder::addField(), IRStructDefinition::to_string(), and IRStructDefinition::Builder::yield().
| yoi::indexT linkedModuleId |
| yoi::wstr name |
Definition at line 602 of file IR.h.
Referenced by IRStructDefinition::Builder::addTemplateMethodDecl(), IRStructDefinition::Builder::addTemplateMethodDef(), IRVariableTable::lookup(), IRStructDefinition::lookupName(), IRVariableTable::operator[](), IRVariableTable::put(), IRStructDefinition::to_string(), and IRStructDefinition::Builder::yield().
Definition at line 609 of file IR.h.
Referenced by IRStructDefinition::Builder::addField(), IRStructDefinition::Builder::addMethod(), IRStructDefinition::lookupName(), IRStructDefinition::to_string(), and IRStructDefinition::Builder::yield().
| yoi::vec<std::shared_ptr<IRValueType> > storedTemplateArgs |
Definition at line 612 of file IR.h.
Referenced by IRStructDefinition::Builder::setStoredTemplateArgs(), and IRStructDefinition::Builder::yield().
| std::map<yoi::wstr, yoi::structDefInnerPair *> templateMethodDecls |
Definition at line 613 of file IR.h.
Referenced by IRStructDefinition::Builder::addTemplateMethodDecl(), and IRStructDefinition::Builder::yield().
| std::map<yoi::wstr, yoi::implInnerPair *> templateMethodDefs |
Definition at line 614 of file IR.h.
Referenced by IRStructDefinition::Builder::addTemplateMethodDef(), and IRStructDefinition::Builder::yield().
Definition at line 611 of file IR.h.
Referenced by IRStructDefinition::Builder::setStoredTemplateArgs(), and IRStructDefinition::Builder::yield().