Skip to content

Commit

Permalink
Add utility method #importPath to help with the parser later
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Dec 11, 2024
1 parent 455ceb4 commit 753d905
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Famix-Python-Importer/FamixPythonImport.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Extension { #name : 'FamixPythonImport' }

{ #category : '*Famix-Python-Importer' }
FamixPythonImport >> importPath [
| path |
path := self sourceText withoutPrefix: 'import '.
path := path copyUpToSubString: 'as'.
path := path copyWithout: ' '.
^ path
]

0 comments on commit 753d905

Please sign in to comment.