Commit Graph

1291 Commits

Author SHA1 Message Date
Tristan B. Velloza Kildaire 2537005500 Merge branch 'vardec_varass_dependency' into feature/multi_module 2024-03-18 17:50:15 +02:00
Tristan B. Velloza Kildaire 7a2ea96140 Containers
- Added a TODO
2024-03-18 15:28:48 +02:00
Tristan B. Velloza Kildaire 48f078077b Container
- Documented
2024-03-18 15:05:17 +02:00
Tristan B. Velloza Kildaire 07be57ab5f Resolver
- Fixed up documentation
- `generateNameBest(Entity)` now has a WAY cleaner implementation that uses the `findContainerOfType(..., ...)` method
- Documented `isDescendant(Container, Entity)` and fixed it up for `Program` related things
- Updasted documentation and error messages which print when using `resolveBwest(Container, string)` with `Program` as the container and referring to a non-module-only name.

Resolver (unittests)

- Added one huge unittest to test EVERYTHING
2024-03-17 18:29:11 +02:00
Tristan B. Velloza Kildaire 1b5e182457 TypeChecker
- When pro0cessing a `DNode` which contains a `Statement` of which is a `FunctionCall` we now will generate the corresponding `FuncCallInstr` using the name that is refered to in the `FunctionCall` (i.e. using `getname()` on the `FunctionCall`) INSTEAD of using the `getName()` method from the `Function` looked up CVIA the `FunctionCall`'s `getName()` method. This ensures that the full path expression is passed into the `FuncCallInstr`. Remember it is looked up later in the emitter but having this name fixed a lto of problems. i.e. having a `b.doThing()` call in module `a` now works. Previously it would look up just `doThng()` as that is all that was all whic was saved within the `FuncCallInstr`.
- Rule of thumb when deating any sort of `Instruction` whic refers to some entity using a name, save-what-you-see. Don't eaergly lookup stuff and re-generate names because the name y7ou see is normally syntactically correct from the user.
2024-03-17 17:17:16 +02:00
Tristan B. Velloza Kildaire a238da9cc0 DGen
- Now takes in a `SymbolMapperV2`
- We now have made use of the new symbol mapping facilities and (for now) we are mapping everything with a `GLOBAL` `ScopeType`. n this case  have added comments above each mapping request to reconsider which scope type should be used on a case-by-case basis.
- We now first call `emitStdint(..., ...)` prior to `emitExterns(..., ...)` because the latter uses types defined in the former (think of well, the `uint32_t` types for example)
- Defined a new type `ModuleExternSet` which holds a `Module` and its respetcive publically accessible `Function`(s) and `Variable`(s)
- Implemented `generateExternsForModule(Module mod)` which generates a `ModuleExternSet` for the given `Module`
- Updated `emitExterns(File modOut, Module mod)` to now determine all `Module[]` except the incoming `mod` itself and then generate `ModuleExternSet`()s for each. These are then looped through and extern statements are generated for each `ModuleExternSet's `pubFns()` and (soon) we will also add support for the `pubVars()` of each
2024-03-17 17:12:14 +02:00
Tristan B. Velloza Kildaire 383e81b47f CodeEmitter
- Now makes use of `SymbolMapperV2` for the mapper

Compiler

- Now uses the new `HashMapper` and `LebanonMapper`.
- Along with this it also now uses the `SymbolmapperV2` API
2024-03-17 13:25:33 +02:00
Tristan B. Velloza Kildaire df0b57a097 HashMapper
- Updated the mapping technique to prepend the characters `t_` or else the `DGen` gets very angry bevause the symbol names sometimes start with numbers of a sequencce of characters that meanns something else (an illegal symbol name).

HashMapper (unittest)

- Updated unittest to correspond with the fix)
2024-03-17 13:23:16 +02:00
Tristan B. Velloza Kildaire 4d9c938fb7 Test cases
- Updated `a.t` to have its own `main` method and try refer to something outside of its own module (something in `b.t`)
- Updated `b.t` to have a method named `doThing()`
2024-03-17 13:21:31 +02:00
Tristan B. Velloza Kildaire bb180b66d3 Resolver
- Fixed a bug in `resolveUp(Container currentContainer, Predicate!(Entity) predicate)` which would cause a segmentation fault when we had climbed to the top of the AST hierachy but we tried to find the `parentOf()` a `Program`. This would fail because only kind-of `Statement`(s) have the `parentOf()` method. We normally do a `cast(Entity)container` to therefore get such access to that method (as all `Entity`(s) are a kind-of `Statement`). However a `Program` is notably NOT an `Entity` and hence this would fail. Ths fix therefore was to add a check that if `entity` was `null` meaning that the `resolveWithin(Container, `Predicate!(Entity))` failed that we must not try to climb further. We do this by checking that with an intermediary else-if branch that, if the within-search failed AND we have a `cast(Program)container` which is non-`null` then we stop the search with zero-results by returning `null`

Program

- When one calls `setModule(ModuleEntry, Module)` then the incoming `Module` should be parented to the `Program` itself
2024-03-17 13:19:08 +02:00
Tristan B. Velloza Kildaire 53444ffe56 Dub
- Upgraded `niknaks` to versoin `0.9.8`
2024-03-15 18:46:15 +02:00
Tristan B. Velloza Kildaire 4b1fabade1
Feature: Collector-based resolution methods (#37)
* Resolver

- Added collector-based searching for `resolveWithin(..., ..., ...)`

* DGen

- Corrected `DGen` call to use new `Resolver` method
2024-03-12 19:30:43 +02:00
Tristan B. Velloza Kildaire fcdfae6f00 DGen
- Initial code for `emitExterns(File, Module)`
2024-03-12 19:12:07 +02:00
Tristan B. Velloza Kildaire 16767a10c2
Feature: Pluggable predicate-based resolution method (#36)
* Dub

- Upgraded `niknaks` to version `0.9.7`

* Resolver

- Documented the class and some new and existing
- Implemented a version of `resolveWithin(...)` which now takes in a `Predicate!(Entity)` instead of a name and then uses that as the final matching step when iterating over the given `Container`'s `Statement[]` (the container's immediate body)
- Implemented `derive_nameMatch(string name)` which returns a `Predicate!(Entity)` closure which matches based on names
- Updated `resolveWithin(Container, string)` to make use of these above two changes
- A similar change including the above rework and predicate derivation has been done for `resolveUp(...)`, of which there is now a version available as `resolveUp(Container, Predicate!(Entity))`
- Stub version of `resolveBest(Container c, Predicate!(Entity) d)` added but not implemented yet
- Added some unsued types and methods, `SearchCtx` and `findFrom!(...)(...)` respectively
- Added `derive_functionAccMod(AccessorType)` (this is to be moved into `DGen` as that is where it is needed)

* Resolver

- Removed `derive_functionAccMod(AccessorType)`

DGen

- Added `derive_functionAccMod(AccessorType)`

* Resolver

- Removed the old code that was commented out in `resolveWithin(Container currentContainer, string name)`

* Resolver

- Cleaned up commented out code for `resolveUp(Container currentContainer, string name) and also documented it

* Resolver

- Removed unused things
2024-03-12 18:51:58 +02:00
Tristan B. Velloza Kildaire 4424043ccb Parser
- Fixed the parsing of bodies of structs and classes. Previously they would call `parseName()` when hitting a `SymbolType.IDENT_NAME` however this would allow assignments and function calls, we don't want this. Switched to `parseTypedDeclaration()` + checking the symbol left in lexer after it (ensuring it was a semicolon) and then consuming it)
2024-02-29 19:41:38 +02:00
Tristan B. Velloza Kildaire 9e54688fcd DGen
- When we find an entrypoint use `a` mode when opening the file for it, `w` mode would wipe the previously written C source code
- Also added a note regarding this branch (if-else) above
- Updated error message when no entry point (and not a test file) is found
- Fixed `emitStaticAllocations(File modOut, Module mod)` to select the static init queue using the provided `Module`
- Fixed `emitFunctionPrototypes(File modOut, Module mod)` and `emitFunctionDefinitions(File modOut, Module mod)` to use the inheritted `CodeEmitter` methods correctly by passing in a `Module`, similar changes affecting the `TypeChecker` are now conformed to in s similar manner
- Fixed `emitFunctionPrototype(File modOut, Module mod, string functionName)` and `emitFunctionDefinition(File modOut, Module mod, string functionName)` to select the function definition queue of the given `functionName` by the given `Module`
- Fixed `emitCodeQueue(File modOut, Module mod)` to select the globals queue by `Module`
- Added some comments about future features to `emitEntrypoint(File modOut, Module mod)`
2024-02-29 13:38:17 +02:00
Tristan B. Velloza Kildaire d491839047 CodeEmitter
- Selecting a queue now requires an owner `Module` and it will also, when the `QueueType` is set to `FUNCTION_DEF_QUEUE`, copy over the correct `Instruction[][string]` and then, furthermore, select the correct `Instruction[]` out of it and set that as the current code queue
- Updated `getFunctionDefinitionsCount(Module owner)` and `getFunctionDefinitionNames(Module owner)` to select the correct `Instruction[][string]` when called
2024-02-29 13:38:03 +02:00
Tristan B. Velloza Kildaire 5e57d5c6c1 TypeChecker
- We now get all of the top-level `DNode` (dependency nodes) and then from there onwards we `performLinearization()` -> `getLinearizedNoes()` -> `doTypeCheck(DNode[])`, at each stage collecting the global code queue, the function definitions (each of their code queues) and the static init queues. These are then collected ina  `ModuleQueue` for the respective `Module` being processed
- Added methods `getModQueueFor(Module owner)`, `scratchToModQueue(Module owner)`, `funcScratchToModQueue(Module owner, FunctionData fd)` and `initsScratchToModQueue(Module owner)`
- Updated the following methods to make use of the `ModuleQueue`(s) available by selecting by an owner `Module`: `getGlobalCodeQueue(Module owner)`, `getFunctionBodyCodeQueues(Module owner)` and `getInitQueue(Module owner)`

ModuleQueue

- Added new type
2024-02-29 13:37:50 +02:00
Tristan B. Velloza Kildaire de3325ead3 FunctionData
- Added `Module`-based ownership model
- Implemented methods `setOwner(Module mod)` and `getOwner()`
- Implemented method `getName()`

DNodeGenerator

- When processing a function definition (a `Function`) we now will call `addFunctionDef` with the owner of this `Function`, this is done by making use of the `Module root` which is set in such a case (and others) when entering the `generalPass(Module, Context)` method
2024-02-29 13:37:29 +02:00
Tristan B. Velloza Kildaire c4a37a1789 FuncDefStore
- Now conforms to the new `IFuncDefStore` API
2024-02-29 13:15:21 +02:00
Tristan B. Velloza Kildaire 47f2c45abb IFuncDefStore
- All methods now require an owner `Module`
2024-02-29 13:13:28 +02:00
Tristan B. Velloza Kildaire 3e17cd070d DNodeGenerator
- When calling `generate()` set a nice name for the dependency nodes of the `Module`(s)
2024-02-28 08:38:21 +02:00
Tristan B. Velloza Kildaire 1f38c36e4b DNode
- Implemented `getDepCount()` and `getDeps()`

DNodeGenerator

- Now uses `ProgramDepNode`
2024-02-28 08:29:43 +02:00
Tristan B. Velloza Kildaire 7f29941fdd ProgramDepNode
- Added new type
2024-02-28 08:21:58 +02:00
Tristan B. Velloza Kildaire 08e45bf9a2 DNodeGenerator
- Removed `functionDefinitions` as it is no longer used anymore, we now make use of the `IFuncDefStore`
2024-02-28 08:13:44 +02:00
Tristan B. Velloza Kildaire b402e1bfc9 DNodeGenerator
- Cleaned up the constructor
- Made `resolver` private
2024-02-28 08:12:36 +02:00
Tristan B. Velloza Kildaire 51ce81f399 TypeChecker
- Cleaned up some more
2024-02-28 08:08:15 +02:00
Tristan B. Velloza Kildaire 421d65f7ed TypeChecker
- Use `Module`, as no cast is needed
- Cleaned up
2024-02-28 08:06:29 +02:00
Tristan B. Velloza Kildaire 22461b91a2 CodeEmitter
- Removed already-completed TODO
2024-02-27 22:57:48 +02:00
Tristan B. Velloza Kildaire c55f4fe515 HashMapper
-  Actually fixed unittest
- Added more debug-time debugging prints
- Had to use `dup` (BUG)!
2024-02-27 22:25:47 +02:00
Tristan B. Velloza Kildaire 57c2491ce4 HashMapper
- Added unittests
- Looks like it works as expected as well
2024-02-27 21:35:25 +02:00
Tristan B. Velloza Kildaire 130903adfc LebanonMapper
-  Added unittest
- Seems like it completely works as expected for both `ScopeType`'s
2024-02-27 21:31:38 +02:00
Tristan B. Velloza Kildaire 7f0d5bbbea TypeChecker
- Removed `deprecated_getModule()`
- Removed old `modulle` field
- Cleaned up field definition section
- Removed old usages of `modulle` and now rooting at the now-new topmost `Container`; the `Program`
2024-02-27 21:12:27 +02:00
Tristan B. Velloza Kildaire 56d7b62794 DNodeGenerator
- Fixed `DNode` construction in `generate()` method

PoolManager (unitttests)

- Fixed unittests
2024-02-27 10:42:15 +02:00
Tristan B. Velloza Kildaire 58caf6fc59 Merge branch 'vardec_varass_dependency' into feature/multi_module 2024-02-27 10:34:17 +02:00
Tristan B. Velloza Kildaire df6dfe14d0
🧹🧼 Cleanup: Pool provider (#33)
* IPoolManager

- Added new interface

* Pool

- Added missing imports

* IPoolManager

- Moved to the `interfaces` module

* IPoolManager

- Updated API to take in a `DNodeGenerator` as the first argument to `pool(..., ...)`

* Revert "IPoolManager"

This reverts commit 4f92a29da2.

* PoolManager

- Added an implementation of the `IPoolManager` interface

* DNodeGenerator

- Now constructs a new `IPoolManager` on constructions

* IPoolManager

- Added a templatised variant of the `pool(Statement)` method

* PoolManager

- Added a templatised variant of the `pool(Statement)` method
- The `pool(Statement)` method now uses the `poolT!(DNodeType, EntityType)(EntityType)` method

* IPoolManager

- Removed the templatised `poolT!(DNodeType, EntityType)(EntityType)` method
- Added `poolExpression(Expression expression)`
- Added `poolVariable(Variable variable)`
- Added `poolStaticVariable(Variable variable)`
- Added `poolFuncDec(Function func)`

* IPoolManager

- Removed uneeded import

* PoolManager

- Removed the templatised `poolT!(DNodeType, EntityType)(EntityType)` method
- Implemented `poolExpression(Expression expression)`
- Implemented `poolVariable(Variable variable)`
- Implemented `poolStaticVariable(Variable variable)`
- Implemented `poolFuncDec(Function func)`

* ExpressionDNode

- No longer takes in a `DNodeGenerator`

AccessDNode

- No longer takes in a `DNodeGenerator`
- Save the incoming `Entity`
- Updated `initName()` to use the `toString()` of the `Entity`

ClassVirtualInit

- No longer takes in a `DNodeGenerator`
- Save the incoming `Clazz`
- Updated `initName()` to use the `toString()` of the `Clazz`

ClassStaticNode

- No longer takes in a `DNodeGenerator`
- Save the incoming `Clazz`
- Updated `initName()` to use the `toString()` of the `Clazz`

ObjectInitializationNode

- No longer takes in a `DNodeGenerator`

VariableNode

- No longer takes in a `DNodeGenerator`
- Updated `initName()` to use the `toString()` of the `Variable`

FuncDecNode

- No longer takes in a `DNodeGenerator`
- Updated `initName()` to use the `toString()` of the `Function`

ModuleVariableDeclaration

- No longer takes in a `DNodeGenerator`
- Updated `initName()` to use the `toString()` of the `Variable`

StaticVariableDeclaration

- No longer takes in a `DNodeGenerator`
- Updated `initName()` to use the `toString()` of the `Variable`

VariableAssignmentNode

- No longer takes in a `DNodeGenerator`
- Updated `initName()` to use the `toString()` of the `VariableAssignment`

* PoolManager

- No longer takes in a `DNodeGenerator` for its constructor
- We no longer require it
- No longer pass a `DNodeGenerator` to the `DNodeType(...)`s created in `poolT!(...)(...)`

PoolManager (unittests)

- Updated unittests

* Depencency (module)

- The `addFunctionDef(...)` method now takes in an extra first argument which is the `IPoolManager` it
should use when it constructs its `DFunctionInnerGenerator`

DNode

- Removed the `DNodeGenerator` instance (i.e. the `dnodegen` field)
- Removed the `Resolver` instance (i.e. the `resolver` field)
- Calling `pool(Statement entity)` will now forward that call to the `IPoolManager`'s `pool(Statement)`
- Calling `DNodeType poolT(DNodeType, EntityType)(EntityType entity)` will now forward that call to the `IPoolManager`'s `pool(Statement)` with the correct types decided at compile-time using static if's
- `objectInitialize(Clazz clazz, NewExpression newExpression)` now constructs a `ObjectInitializationNode` with
its new API
- `pool_module_vardec(Variable entity)` now constructs a `ModuleVariableDeclaration` with its new API
- When `generalStatement(Container c, Context context, Statement entity)` comes across a function definition
(i.e. a `Function`) and has to add its function definition it now uses the updated `addFunctionDef(...)`
- `poolClassStatic(Clazz clazz)` now constructs a `ClassStaticNode` with its new API

DFunctionInnerGenerator

- Constructor now accepts an `IPoolManager` instance

DNodeGenerator

- Constructor now accepts an `IPoolManager` instance
- We now use the `IPoolManager` as our pooling mechanism

* TypeChecker

- When we call `dependencyCheck()` we now first construct the pooling mechanism we want to use
by constructing some kind-of `IPoolManager`, we then pass this to the constructor for the
`DNodeGenerator`

* IPoolManager

- Added `poolModuleVariableDeclaration(Variable variable)`

* PoolManager

- Impemented `poolModuleVariableDeclaration(Variable variable)`

* DNodeGenerator

- `pool_module_vardec(Variable entity)` now calls `poolModuleVariableDeclaration(Variable)` from `IPoolManager`
- Removed the static `nodePool`

* IPoolManager

- Added some stuff

* IPoolManager

- Nah, removed that

* IPoolManager

- Added `poolClassStatic(Clazz clazz)`

* PoolManager

- Implemented `poolClassStatic(Clazz clazz)`

* DNodeGenerator

- Calling `poolClassStatic(Clazz clazz)` now calls `IPoolManager`'s `poolClassStatic(Clazz)`

* IPoolManager

- Documented module

* PoolManager

- Documented module

* Merge branch 'vardec_varass_dependency' into feature/poolmngr
2024-02-27 10:30:34 +02:00
Tristan B. Velloza Kildaire 93d295412d DGen
- Use `else` rather than hard coding all test cases. This will only be used if no main module is found AND testing is enabled - so it should be a safe bet
2024-02-27 10:03:11 +02:00
Tristan B. Velloza Kildaire 0a6b89cf68 FuncDefStore
- Use `tc.getProgram()` in place of `tc.getModule()` when doing a name generation via the `Resolver`
2024-02-27 09:53:23 +02:00
Tristan B. Velloza Kildaire 37af287163 Merge branch 'vardec_varass_dependency' into feature/multi_module 2024-02-27 09:36:32 +02:00
Tristan B. Velloza Kildaire c55cd74596
🧹🧼 Cleanup: addFuncDef/clearFuncDefs should all use a non-static pool (#34)
* IFuncDefStore

- Added new interface

* FuncDefStore

- Implemented new `IFuncDefStore` type

* FuncDefStore

- The constructor now takes in a `TypeChecker` instance
- Implemented `addFunctionDef(Function func)`

* FuncDefStore

- Added a TODO + some code for a future naming setup I want to se

* IPoolManager

- Added documentation
- Added new method `grabFunctionDef(string name)` to the API

* FuncDefStoreException

- Added new exception type

* IPoolManager

- Added more docs for `grabFunctionDef(string name)`

* FuncDefStore

- Pass in ourselves (a `IFuncDefStore`) into the `DFunctionInnerGenerator` when adding a function definition
- Implemented `grabFunctionDef(string name)` from the updated `IFuncDefStore` API

* DNodeGenerator

- Constructor now takes in a `IFuncDefStore`
- When we encounter a `Function` we will add it to the store of function definitions
by using the new `IFuncDefStore` (instead of the old `addFunctionDef(TypeChecker, Function)`
- Removed unused method `saveFunctionDefinitionNode(DNode funcDefNode)`
- Removed unused method `retrieveFunctionDefinitionNode(string functionAbsolutePath)`
- Removed the old method `addFunctionDef(TypeChecker tc, Function func)` (as we are now using the `IFuncDefStore`)
- Removed the `clearFuncDefs()` as we are now using the `IFuncDefStore`
- Removed the `grabFunctionDefs()` as we are now using the `IFuncDefStore`
- Removed the `FunctionData[string]` as we are now using the `IFuncDefStore`

DFunctionInnerGenerator

- Constructor now takes in a `IFuncDefStore`

* TypeChecker

- `dependencyCheck()` no lomger calls the removed `clearFuncDefs()` from the `dependency.core` module
- `dependencyCheck()` now constructs a new `IFuncDefStore` and then passes it into the `DNodeGenerator`
when dependency generation needs to occur

* IFuncDefStore

- Added module-level documentation

* FuncDefStore

- Documented class
- Documented module

* FuncDefStoreException

- Documented constructor and class

* IFuncDefStore

- `addFunctionDef(Function func)` may now throw a `FuncDefStoreException` when you add a function that already exists

* FuncDefStore

- `addFunctionDef(Function func)` now throws a `FuncDefStoreException` when you provide a `Function` that has already been added

* IFuncDefStore

- Moved import to the top

* FuncDefStore

- Cleaned up
2024-02-27 09:33:18 +02:00
Tristan B. Velloza Kildaire 8bf076b999 TypeChecker (unittests)
- Fixed up calls to `getBuiltInType(...)` which now require some `Container` to pivot on. We now pass in the `Program`
- Fixed up unittests which used `getModule()`, for such uni-modular tests we just use `program.getModules()[0]` now
2024-02-27 09:19:40 +02:00
Tristan B. Velloza Kildaire b352b7d3f6 MetaProcessor
- When getting the type root everything on the `Program` rather than `tc.getModule()`. We therefore now use the `tc.getProgram()` in its place. This updates the `sizeOf_Literalize(string typeName)` method.

DGen

- `emit()` has been updated to enumerate all `Module[]` of the given `Program` and then calls the respecitve `emit(...)` methods with a (`File`, `Module`) which contains the file which emitting should be written to and also the `Module` being emitted.
- At the end of `emit()` we then try to find the `Module` which contains a function named `main` and then set that as the entrypoint. If such a `main` function cannot be found we then go and do a check whether or not the `dgen:emit_entrypoint_test` configuration option is `true`, if so we then try emit a testing entrypoint and assume that the tst uses only one `Module` (this is something to be cleaned up later; as in all tests should have a `main` method).
- Implemented `findEntrypoint(ref Module mainModule, ref Function mainFunc)` which does as the name implies and finds the containing `Module` which has a `Function` named `"main"` and if so sets both ref arguments and returns `true`, otherwise they are left unset and `false` is returned
- `emitHeaderComment(...)`, `emitStaticAllocations(...)`, `emitFunctionPrototypes(...)`, `emitFunctionDefinitions(...)`, `emitFunctionPrototype(...)`, `emitFunctionDefinition(...)`, `emitCodeQueue(...)`, `emitStdint(...)`, `emitEntrypoint(...)`, `emitTestingEntrypoint(...)` now takes in `File modOut` and `Module mod`
- Note the above have not YET been updated to select correct code queues, static init. queues and `emitEntrypoint(...)` has not yet been implemented
- Updated `emitTestingEntrypoint(...)` to check using the incoming `Module`'s name
- `finalize()` will now compile all sources files, then it will link all generated object files together; optionally cleaning up all but the final genersted excutable at the end

CollidingNameException

- Fixed up name generation (we now anchor on the `Program`)
- Fixed up how we detect if a module's name is in use. We now will check and ensure it doesn't match ANY of the modules contained within the `Program`

DNode

- Implemented `forceName(string)` to set the `name` field forcefully
- The `generate()` method now calls `generalPass(Module, Context)` on each of the `Program`'s `Module`s. We then get an array of `DNode[]` from them. After this we then create a root `DNode` to represent the program and then we make it `needs(DNode)` each `Module` `DNode` created previously.

DNodeGenerator

- When processing `VariableExpression` in `expressionPass(Expression exp, Context context)`, if we get a `Function` being referred to in the expression, then we now set the `Context`'s `Container` still to the `Module` containing the function's definition, _however_ we use a method from the resolver to ensure it is the correct module (because we are now using a multi-module setup).
- We have always set the **root** `Module` when entering `generalPass(Container c, Context context)` and processing a `Function` but, as with the last change mentioned above, we need to find that containing `Module` correctly. Therefore we use a method from the `Resolver` to do that.
2024-02-27 09:01:06 +02:00
Tristan B. Velloza Kildaire 4479df0501 HashMapper
- Added support for `ScopeType.LOCAL` in a similar fashion to how it is done in `LebanonMapper`
2024-02-26 09:41:39 +02:00
Tristan B. Velloza Kildaire 0be3376fc2 LebanonMapper
- Join with periods and let step afterwards do the replacement
2024-02-26 09:39:41 +02:00
Tristan B. Velloza Kildaire b2cf6a53a1 LebanonMapper
- If called with `ScopeType.LOCAL` then the name will be generated in an absolute sense, however the module name will be stripped from the path
- For example `simple_module.a.b` would become `a.b` and then be mapped to `a_b`
2024-02-26 09:36:03 +02:00
Tristan B. Velloza Kildaire 0f51f73e36 LebanonMapper
- Fixed wrong variable name in `map(Entity item, ScopeType type)`

HashMapper

- Implemented `map(Entity item, ScopeType type)` for `ScopeType.GLOBAL`
- `ScopeType.LOCAL` is yet to be implemented
2024-02-26 08:32:39 +02:00
Tristan B. Velloza Kildaire 94dc6f9c71 LebanonMapper
- Now respects the `type` field for `copeType.GLOBAL`
- `ScopeType.LOCAL` is still to be implemented
2024-02-26 08:28:17 +02:00
Tristan B. Velloza Kildaire 4625e0516e LebanonMapper
- Implemented `map(Entity item, ScopeType type)`
2024-02-26 08:25:34 +02:00
Tristan B. Velloza Kildaire ac54002cac Implementations
- Added some stub types `LebanonMapper` and `HashMapper`
2024-02-26 08:21:48 +02:00
Tristan B. Velloza Kildaire 6ce79a8721 SymbolMapperV2
- Added missing import for `Entity` type
2024-02-25 21:54:34 +02:00