diff --git a/config.nims b/config.nims index ccedc2d..8ee48d2 100644 --- a/config.nims +++ b/config.nims @@ -2,6 +2,3 @@ when withDir(thisDir(), system.fileExists("nimble.paths")): include "nimble.paths" # end Nimble config - -switch("p", "$projectDir/nimbledeps/pkgs2/nim-2.0.0-35b9d926d314ce8c3326902c138f5c2247cfd390/compiler") -switch("p", "$projectDir/../nimbledeps/pkgs2/nim-2.0.0-35b9d926d314ce8c3326902c138f5c2247cfd390/compiler") diff --git a/src/nph.nim b/src/nph.nim index 76df976..c097b3d 100644 --- a/src/nph.nim +++ b/src/nph.nim @@ -4,7 +4,8 @@ import "."/[astcmp, phast, phastalgo, phmsgs, phlineinfos, phoptions, phparser, phrenderer] -import idents +import + "$nim"/compiler/idents from "$nim"/compiler/astalgo import nil diff --git a/src/phast.nim b/src/phast.nim index d027725..1a80106 100644 --- a/src/phast.nim +++ b/src/phast.nim @@ -12,9 +12,12 @@ # nph version: # * enhanced concrete syntax information -import hashes, options, ropes, idents, int128, tables +import + std/[hashes, tables] +import + "$nim"/compiler/[idents, options, int128, ropes] -from strutils import toLowerAscii +from std/strutils import toLowerAscii import "."/phlineinfos diff --git a/src/phastalgo.nim b/src/phastalgo.nim index f7c2374..6b84762 100644 --- a/src/phastalgo.nim +++ b/src/phastalgo.nim @@ -14,7 +14,10 @@ # nph version: # * yaml formatting for the nph-specific fields -import phast, hashes, intsets, phoptions, phlineinfos, ropes, idents, rodutils, phmsgs +import + "."/[phast, phoptions, phlineinfos, phmsgs], + std/[hashes, intsets], + "$nim"/compiler/[ropes, idents, rodutils] import strutils except addf when defined(nimPreviewSlimSystem): diff --git a/src/phlexer.nim b/src/phlexer.nim index c221491..abb8215 100644 --- a/src/phlexer.nim +++ b/src/phlexer.nim @@ -26,8 +26,9 @@ # end-of-comment marker. import - hashes, phoptions, phmsgs, strutils, platform, idents, nimlexbase, llstream, wordrecg, - phlineinfos, pathutils, parseutils + "$nim"/compiler/[idents, platform, nimlexbase, llstream, pathutils, wordrecg], + "."/[phoptions, phmsgs, phlineinfos], + std/[hashes, strutils, parseutils] when defined(nimPreviewSlimSystem): import std/[assertions, formatfloat] diff --git a/src/phlineinfos.nim b/src/phlineinfos.nim index 9abe962..5d3a8fd 100644 --- a/src/phlineinfos.nim +++ b/src/phlineinfos.nim @@ -11,7 +11,8 @@ ## This module contains the ``TMsgKind`` enum as well as the ## ``TLineInfo`` object. -import ropes, tables, pathutils, hashes +import + "$nim"/compiler/[ropes, pathutils], std/[hashes, tables] const explanationsBaseUrl* = "https://nim-lang.github.io/Nim" diff --git a/src/phmsgs.nim b/src/phmsgs.nim index 1229c7b..8ea70e4 100644 --- a/src/phmsgs.nim +++ b/src/phmsgs.nim @@ -12,11 +12,10 @@ import std/[strutils, os, tables, terminal, macros, times], std/private/miscdollars, - pathutils -import - ./phlineinfos, ./phoptions + "$nim"/compiler/pathutils, + "."/[phlineinfos, phoptions] -import ropes except `%` +import "$nim"/compiler/ropes except `%` when defined(nimPreviewSlimSystem): import std/[syncio, assertions] diff --git a/src/phoptions.nim b/src/phoptions.nim index 08e3ff5..8e7c3e2 100644 --- a/src/phoptions.nim +++ b/src/phoptions.nim @@ -9,11 +9,14 @@ # distribution, for details about the copyright. # -import os, strutils, strtabs, sets, platform, prefixmatches, pathutils, nimpaths, tables -import phlineinfos - -from terminal import isatty -from times import utc, fromUnix, local, getTime, format, DateTime +import + std/[os, strutils, strtabs, sets, tables], + "$nim"/compiler/[platform, prefixmatches, pathutils, nimpaths] +import + ./phlineinfos + +from std/terminal import isatty +from std/times import utc, fromUnix, local, getTime, format, DateTime from std/private/globs import nativeToUnixPath when defined(nimPreviewSlimSystem): import @@ -901,7 +904,7 @@ proc clearNimblePath*(conf: ConfigRef) = conf.nimblePaths.setLen(0) include - packagehandling + "$nim"/compiler/packagehandling proc getOsCacheDir(): string = when defined(posix): diff --git a/src/phparser.nim b/src/phparser.nim index ecafd47..4c0c07d 100644 --- a/src/phparser.nim +++ b/src/phparser.nim @@ -32,7 +32,8 @@ # that the lexer is trying to do comment layout / reflow / analysis in the # middle of lexing.. -import llstream, idents, strutils, pathutils +import + "$nim"/compiler/[llstream, idents, pathutils], std/[strutils] import "."/[phast, phlexer, phlineinfos, phmsgs, phoptions] when defined(nimPreviewSlimSystem): diff --git a/src/phrenderer.nim b/src/phrenderer.nim index 90306ae..10e80ea 100644 --- a/src/phrenderer.nim +++ b/src/phrenderer.nim @@ -18,8 +18,10 @@ {.used.} -import idents, strutils, sequtils -import phlexer, phoptions, phast, phmsgs, phlineinfos +import + "$nim"/compiler/[idents], std/[strutils, sequtils] +import + "."/[phlexer, phoptions, phast, phmsgs, phlineinfos] when defined(nimPreviewSlimSystem): import std/[syncio, assertions, formatfloat]