Skip to content

Commit

Permalink
Merge pull request #5 from moosetechnology/cleaning
Browse files Browse the repository at this point in the history
make tests pass
  • Loading branch information
NicolasAnquetil authored Jan 4, 2024
2 parents a2d8ee5 + 522fbe9 commit 230256b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/MoosePy/MSEPythonToFamixImporterVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ MSEPythonToFamixImporterVisitor >> createImport: anImport ofName: aName from: fr

self setSourceAnchor: import from: anImport.

module := self ensureModuleNamed: fromName fromNode: anImport parent parent.
module := sender top.
import manualImportingEntity: module.
module manualAddImport: import.

Expand Down Expand Up @@ -237,6 +237,12 @@ MSEPythonToFamixImporterVisitor >> ensureMethod: aMethodNode [
self createMethod: aMethodNode ]
]

{ #category : #'private-entity-creation' }
MSEPythonToFamixImporterVisitor >> ensureModuleFromFileInputNode: aFileInputNode [

^self ensureModuleNamed: aFileInputNode filename basename withoutExtension fromNode: aFileInputNode
]

{ #category : #'private-entity-creation' }
MSEPythonToFamixImporterVisitor >> ensureModuleNamed: moduleName fromNode: aModuleNode [

Expand Down Expand Up @@ -671,7 +677,9 @@ MSEPythonToFamixImporterVisitor >> visitDottedName: anDottedNameNode [
MSEPythonToFamixImporterVisitor >> visitFileInput: aFileInputNode [

| module |
module := self ensureModuleNamed: aFileInputNode filename fromNode: aFileInputNode.
module := self
ensureModuleNamed: (self moduleNameStringOf: aFileInputNode)
fromNode: aFileInputNode.
sender push: module.

self acceptNodes: aFileInputNode statements.
Expand Down

0 comments on commit 230256b

Please sign in to comment.