nimfix supports specialized '.nimfix' modules
This commit is contained in:
parent
7333237be6
commit
c53a27f0dc
4 changed files with 31 additions and 18 deletions
|
|
@ -8,11 +8,12 @@
|
|||
#
|
||||
|
||||
import ast, msgs, strutils, idents
|
||||
from os import splitFile
|
||||
|
||||
type
|
||||
TSourceFile* = object
|
||||
lines*: seq[string]
|
||||
dirty*: bool
|
||||
dirty*, isNimfixFile*: bool
|
||||
fullpath*: string
|
||||
|
||||
var
|
||||
|
|
@ -26,7 +27,8 @@ proc loadFile*(info: TLineInfo) =
|
|||
gSourceFiles[i].lines = @[]
|
||||
let path = info.toFullPath
|
||||
gSourceFiles[i].fullpath = path
|
||||
# we want to die here for EIO:
|
||||
gSourceFiles[i].isNimfixFile = path.splitFile.ext == "nimfix"
|
||||
# we want to die here for IOError:
|
||||
for line in lines(path):
|
||||
gSourceFiles[i].lines.add(line)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue