mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-03 10:24:44 +00:00
@@ -72,12 +72,16 @@ proc parsePipe(filename: AbsoluteFile, inputStream: PLLStream; cache: IdentCache
|
||||
i = 0
|
||||
inc linenumber
|
||||
if i+1 < line.len and line[i] == '#' and line[i+1] == '?':
|
||||
inc(i, 2)
|
||||
while i < line.len and line[i] in Whitespace: inc(i)
|
||||
var q: TParser
|
||||
parser.openParser(q, filename, llStreamOpen(substr(line, i)), cache, config)
|
||||
result = parser.parseAll(q)
|
||||
parser.closeParser(q)
|
||||
when defined(nimpretty2):
|
||||
# XXX this is a bit hacky, but oh well...
|
||||
quit "can't nimpretty a source code filter"
|
||||
else:
|
||||
inc(i, 2)
|
||||
while i < line.len and line[i] in Whitespace: inc(i)
|
||||
var q: TParser
|
||||
parser.openParser(q, filename, llStreamOpen(substr(line, i)), cache, config)
|
||||
result = parser.parseAll(q)
|
||||
parser.closeParser(q)
|
||||
llStreamClose(s)
|
||||
|
||||
proc getFilter(ident: PIdent): TFilterKind =
|
||||
|
||||
@@ -9,7 +9,7 @@ var
|
||||
failures = 0
|
||||
|
||||
when defined(develop):
|
||||
const nimp = "bin/nimpretty".addFileExt(ExeExt)
|
||||
const nimp = "bin" / "nimpretty".addFileExt(ExeExt)
|
||||
if execShellCmd("nim c -o:$# nimpretty/nimpretty.nim" % [nimp]) != 0:
|
||||
quit("FAILURE: compilation of nimpretty failed")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user