Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor code cleanup

  • Loading branch information...
commit 3ec5ece4988963f25a253bd0ba6602e670feef15 1 parent 538bba6
meh. authored
Showing with 3 additions and 7 deletions.
  1. +3 −7 lib/clj/parser.rb
10 lib/clj/parser.rb
View
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.