diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2009-06-28 15:10:57 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2009-06-28 15:10:57 +0200 |
commit | a4f2a248273064ec464e7d376f8f5778ac808bd6 (patch) | |
tree | b2a0eed3f983181f91a96fc1b9e221c03e05a6fa /src/front/lexer.py | |
parent | 41a2c1fdaa07b3b51bf6073bf6fbb0156b085fa5 (diff) | |
download | swppy-a4f2a248273064ec464e7d376f8f5778ac808bd6.tar.gz swppy-a4f2a248273064ec464e7d376f8f5778ac808bd6.tar.xz swppy-a4f2a248273064ec464e7d376f8f5778ac808bd6.zip |
fixed error with not newline at file end
moved __init__.py with testcode from src/front to src/
added in lexer "\n\n" at source end to have a newline at file end
added unexpected end of file message, if matched token is None
Diffstat (limited to 'src/front/lexer.py')
-rw-r--r-- | src/front/lexer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/front/lexer.py b/src/front/lexer.py index ff67e6d..f2810cd 100644 --- a/src/front/lexer.py +++ b/src/front/lexer.py @@ -4,7 +4,7 @@ from token import * class Lexer: def __init__(self, source): - self.source = source.splitlines() + self.source = (source + "\n\n").splitlines() self.source.reverse() self.line = 0 self.doubleNewlineCheck = False |