class Rouge::RegexLexer

def push(state_name=nil, &b)

{StateDSL}.
passed a block, a state will be dynamically created using the
Push a state onto the stack. If no state name is given and you've
def push(state_name=nil, &b)
  push_state = if state_name
    get_state(state_name)
  elsif block_given?
    StateDSL.new(b.inspect, &b).to_state(self.class)
  else
    # use the top of the stack by default
    self.state
  end
  puts "    pushing :#{push_state.name}" if @debug
  stack.push(push_state)
end