# File lib/puppet-lint/data.rb, line 243 def param_tokens(these_tokens) depth = 0 lparen_idx = nil rparen_idx = nil these_tokens.each_with_index do |token, i| if token.type == :LPAREN depth += 1 lparen_idx = i if depth == 1 elsif token.type == :RPAREN depth -= 1 if depth == 0 rparen_idx = i break end elsif token.type == :LBRACE && depth == 0 # no parameters break end end if lparen_idx.nil? or rparen_idx.nil? nil else these_tokens[(lparen_idx + 1)..(rparen_idx - 1)] end end