Skip to content

Commit

Permalink
Cross-component works, but with MAJOR hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Jan 31, 2025
1 parent 16714d8 commit 44e85e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ class TranslationResult(
/** A free-for-use HashMap where passes can store whatever they want. */
val scratch: MutableMap<String, Any> = ConcurrentHashMap()

@Transient
@PopulatedByPass(ImportResolver::class)
var importDependencies = ImportDependencies(mutableListOf())

/**
* A free-for-use collection of unique nodes. Nodes stored here will be exported to Neo4j, too.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import org.slf4j.LoggerFactory
@DependsOn(TypeHierarchyResolver::class)
@DependsOn(EvaluationOrderGraphPass::class)
@DependsOn(ImportResolver::class)
open class SymbolResolver(ctx: TranslationContext) : ComponentPass(ctx) {
open class SymbolResolver(ctx: TranslationContext) : TranslationResultPass(ctx) {

/** Configuration for the [SymbolResolver]. */
class Configuration(
Expand Down Expand Up @@ -122,8 +122,8 @@ open class SymbolResolver(ctx: TranslationContext) : ComponentPass(ctx) {
null
}

override fun accept(component: Component) {
ctx.currentComponent = component
override fun accept(component: TranslationResult) {
// ctx.currentComponent = component
walker = ScopedWalker(scopeManager)

cacheTemplates(component)
Expand Down

0 comments on commit 44e85e9

Please sign in to comment.