Method: Cyclomagic::ParseDoCond#parse_token

Defined in:
lib/cyclomagic.rb

#parse_token(token) ⇒ Object

Need to consume the do that can appear at the end of these control structures.



505
506
507
508
509
510
511
512
513
514
515
516
517
518
# File 'lib/cyclomagic.rb', line 505

def parse_token(token)
  if @looking_for_new_line
    if token.is_a?(TkDO)
      nil
    else
      if token.is_a?(TkNL)
        @looking_for_new_line = false
      end
      super(token)
    end
  else
    super(token)
  end
end