nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb17487
)
nitpretty: does not assert for location on catch_up
author
Alexandre Terrasa
<alexandre@moz-code.org>
Thu, 8 Jan 2015 09:58:40 +0000
(10:58 +0100)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Tue, 13 Jan 2015 16:47:43 +0000
(17:47 +0100)
This simple fix avoid assert failed on catch_up.
Does a no-op if current_location is after the target location.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
src/pretty.nit
patch
|
blob
|
history
diff --git
a/src/pretty.nit
b/src/pretty.nit
index
9225750
..
39d84ee
100644
(file)
--- a/
src/pretty.nit
+++ b/
src/pretty.nit
@@
-172,7
+172,7
@@
class PrettyPrinterVisitor
else
abort
end
- assert current_token.location <= token.location
+ if current_token.location > token.location then return
while current_token != token do visit current_token
end