Commit 77c454b1 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Comments cleanup loop only if there are comments.

Minor speed gain.
parent 534a687a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -152,7 +152,8 @@ module JsDuck

    def skip_white_and_comments
      skip_white
      while true do
      # Perform the comments cleanup loop only if there are comments
      while @input.check(/\//) do
        if @input.check(/\/\*[^*]/)
          # skip multiline comment
          @input.scan_until(/\*\/|\Z/)