Browse files

Minor code cleanup

  • Loading branch information...
1 parent 538bba6 commit 3ec5ece4988963f25a253bd0ba6602e670feef15 @meh committed Feb 15, 2012
Showing with 3 additions and 7 deletions.
  1. +3 −7 lib/clj/parser.rb
View
10 lib/clj/parser.rb
@@ -306,18 +306,14 @@ def lookahead (length = nil)
result
end
- def ignore (ungetc = true)
+ def ignore (rev = true)
while ignore?(ch = @source.read(1)); end
- return false unless ch
-
- ungetc ? revert(ch) : ch
+ rev ? revert(ch) : ch if ch
end
def revert (ch)
- return unless ch
-
- @source.seek -1, IO::SEEK_CUR
+ @source.seek -1, IO::SEEK_CUR if ch
end
def ignore? (ch)

0 comments on commit 3ec5ece

Please sign in to comment.