- Documented
This commit is contained in:
Tristan B. Velloza Kildaire 2024-04-07 13:43:22 +02:00
parent e4b9b5a36b
commit fc93c8ebda
1 changed files with 28 additions and 0 deletions

View File

@ -17,6 +17,9 @@ import std.string : format;
*/ */
public class LebanonMapper : SymbolMapper public class LebanonMapper : SymbolMapper
{ {
/**
* For access to the resolver
*/
private TypeChecker tc; private TypeChecker tc;
/** /**
@ -32,6 +35,17 @@ public class LebanonMapper : SymbolMapper
this.tc = tc; this.tc = tc;
} }
/**
* Maps the given `Entity` to a symbol
* name with the provided scope type
*
* Params:
* item = the entity to generate a
* symbol name for
* type = the `ScopeType` to map
* using
* Returns: the symbol name
*/
public string map(Entity item, ScopeType type) public string map(Entity item, ScopeType type)
{ {
string path; string path;
@ -106,6 +120,9 @@ unittest
*/ */
public class HashMapper : SymbolMapper public class HashMapper : SymbolMapper
{ {
/**
* For access to the resolver
*/
private TypeChecker tc; private TypeChecker tc;
/** /**
@ -121,6 +138,17 @@ public class HashMapper : SymbolMapper
this.tc = tc; this.tc = tc;
} }
/**
* Maps the given `Entity` to a symbol
* name with the provided scope type
*
* Params:
* item = the entity to generate a
* symbol name for
* type = the `ScopeType` to map
* using
* Returns: the symbol name
*/
public string map(Entity item, ScopeType type) public string map(Entity item, ScopeType type)
{ {
string path; string path;