nitin: continue on bad triple-quoted string and bad extern
authorJean Privat <jean@pryen.org>
Thu, 23 Nov 2017 20:41:50 +0000 (15:41 -0500)
committerJean Privat <jean@pryen.org>
Thu, 23 Nov 2017 20:41:50 +0000 (15:41 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

contrib/nitin/nitin.nit

index 9123b88..2497411 100644 (file)
@@ -107,7 +107,7 @@ redef class ToolContext
                        oldtext = ""
                        var n = p_module(text)
 
-                       if n isa AParserError and (n.token isa EOF) then
+                       if n isa AParserError and (n.token isa EOF or n.token isa TBadTString or n.token isa TBadExtern) then
                                # Unexpected end of file, thus continuing
                                if oldtext == "" then prompt = "." * prompt.length
                                oldtext = text