fixes multi-line comments
This commit is contained in:
parent
a9f6e2a843
commit
3114523a6f
2 changed files with 40 additions and 3 deletions
|
|
@ -913,9 +913,16 @@ proc skip(L: var TLexer, tok: var TToken) =
|
|||
pos = handleCRLF(L, pos)
|
||||
buf = L.buf
|
||||
var indent = 0
|
||||
while buf[pos] == ' ':
|
||||
inc(pos)
|
||||
inc(indent)
|
||||
while true:
|
||||
if buf[pos] == ' ':
|
||||
inc(pos)
|
||||
inc(indent)
|
||||
elif buf[pos] == '#' and buf[pos+1] == '[':
|
||||
skipMultiLineComment(L, tok, pos+2, false)
|
||||
pos = L.bufpos
|
||||
buf = L.buf
|
||||
else:
|
||||
break
|
||||
tok.strongSpaceA = 0
|
||||
when defined(nimfix):
|
||||
template doBreak(): expr = buf[pos] > ' '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue