mirror of https://github.com/nocturn9x/nimkalc.git
The lexer now skips newlines
This commit is contained in:
parent
d1f96da9d1
commit
24785c9a0f
|
@ -140,7 +140,7 @@ proc scanToken(self: Lexer) =
|
|||
## called iteratively until the source
|
||||
## string reaches EOF
|
||||
var single = self.step()
|
||||
if single in [' ', '\t', '\r']: # We skip whitespaces, tabs and other stuff
|
||||
if single in [' ', '\t', '\r', '\n']: # We skip whitespaces, tabs and other stuff
|
||||
return
|
||||
elif single.isDigit():
|
||||
self.parseNumber()
|
||||
|
|
Loading…
Reference in New Issue