fixes #3924
This commit is contained in:
parent
d3ce5f34f8
commit
ef36a9dc3d
1 changed files with 4 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ proc parseLine(p: var TTmplParser) =
|
||||||
keyw: string
|
keyw: string
|
||||||
j = 0
|
j = 0
|
||||||
while p.x[j] == ' ': inc(j)
|
while p.x[j] == ' ': inc(j)
|
||||||
if p.x[0] == p.nimDirective and p.x[1] in {'?', '!'}:
|
if p.x[0] == p.nimDirective and p.x[1] == '?':
|
||||||
newLine(p)
|
newLine(p)
|
||||||
elif p.x[j] == p.nimDirective:
|
elif p.x[j] == p.nimDirective:
|
||||||
newLine(p)
|
newLine(p)
|
||||||
|
|
@ -213,6 +213,9 @@ proc filterTmpl(stdin: PLLStream, filename: string, call: PNode): PLLStream =
|
||||||
p.conc = strArg(call, "conc", 4, " & ")
|
p.conc = strArg(call, "conc", 4, " & ")
|
||||||
p.toStr = strArg(call, "tostring", 5, "$")
|
p.toStr = strArg(call, "tostring", 5, "$")
|
||||||
p.x = newStringOfCap(120)
|
p.x = newStringOfCap(120)
|
||||||
|
# do not process the first line which contains the directive:
|
||||||
|
if llStreamReadLine(p.inp, p.x):
|
||||||
|
p.info.line = p.info.line + int16(1)
|
||||||
while llStreamReadLine(p.inp, p.x):
|
while llStreamReadLine(p.inp, p.x):
|
||||||
p.info.line = p.info.line + int16(1)
|
p.info.line = p.info.line + int16(1)
|
||||||
parseLine(p)
|
parseLine(p)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue