From e2a6562384b356d59690f0e1be7d765b284a4a78 Mon Sep 17 00:00:00 2001 From: David Halter Date: Sat, 20 Apr 2013 09:51:52 +0430 Subject: [PATCH] tokenizer: removed raised errors --- jedi/tokenizer.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/jedi/tokenizer.py b/jedi/tokenizer.py index e48cf30b..e4b5c0d6 100644 --- a/jedi/tokenizer.py +++ b/jedi/tokenizer.py @@ -148,7 +148,8 @@ def generate_tokens(readline): if contstr: # continued string if not line: - raise TokenError("EOF in multi-line string", strstart) + # multiline string has not been finished + break endmatch = endprog.match(line) if endmatch: pos = end = endmatch.end(0) @@ -200,16 +201,13 @@ def generate_tokens(readline): indents.append(column) yield TokenInfo(INDENT, line[:pos], (lnum, 0), (lnum, pos), line) while column < indents[-1]: - if column not in indents: - raise IndentationError( - "unindent does not match any outer indentation level", - ("", lnum, pos, line)) indents = indents[:-1] yield TokenInfo(DEDENT, '', (lnum, pos), (lnum, pos), line) else: # continued statement if not line: - raise TokenError("EOF in multi-line statement", (lnum, 0)) + # basically a statement has not been finished here. + break continued = 0 while pos < max: