diff options
Diffstat (limited to 'compiler/packagehandling.nim')
-rw-r--r-- | compiler/packagehandling.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/packagehandling.nim b/compiler/packagehandling.nim index d7c6b25ae..0e9331128 100644 --- a/compiler/packagehandling.nim +++ b/compiler/packagehandling.nim @@ -43,6 +43,10 @@ proc fakePackageName*(conf: ConfigRef; path: AbsoluteFile): string = result = relativeTo(path, conf.projectPath, '/').string.multiReplace( {"/": "7", "..": "_", "7": "77", "_": "__"}) +proc demaglePackageName*(path: string): string = + result = path.multiReplace( + {"77": "7", "__": "_", "_7": "../", "7": "/"}) + proc withPackageName*(conf: ConfigRef; path: AbsoluteFile): AbsoluteFile = let x = getPackageName(conf, path.string) if x.len == 0: |