Skip to content

Commit

Permalink
corrected(?) a bug in #createFunction:
Browse files Browse the repository at this point in the history
  • Loading branch information
anquetil committed Dec 28, 2023
1 parent f4c4711 commit 338df43
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/MoosePy/MSEPythonToFamixImporterVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,14 @@ MSEPythonToFamixImporterVisitor >> createClass: aClass [
{ #category : #'private-entity-creation' }
MSEPythonToFamixImporterVisitor >> createFunction: aFunctionNode [

| function signature thisModule thisModuleName |
| function signature thisModule |
signature := aFunctionNode parameters ifNotNil: [
aFunctionNode parameters signatureString ].
function := self
basicCreateFunction: aFunctionNode fname value
withSignature: signature.

thisModuleName := (self moduleNameFromFonction: aFunctionNode)
asSymbol.
thisModule := self ensureModule: thisModuleName.
thisModule := self ensureModule: (self moduleFromFonction: aFunctionNode).

function functionOwner: thisModule.

Expand Down Expand Up @@ -502,6 +500,12 @@ MSEPythonToFamixImporterVisitor >> model [
]

{ #category : #'private-entity-creation' }
MSEPythonToFamixImporterVisitor >> moduleFromFonction: aFunctionNode [

^(self parentFileForNode: aFunctionNode)
]

{ #category : #TOREMOVE }
MSEPythonToFamixImporterVisitor >> moduleNameFromFonction: aFunctionNode [

| parentFileName |
Expand Down

0 comments on commit 338df43

Please sign in to comment.