You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: builder.rb
    path of file: ./repos/stackneveroverflow/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/journey/gtg
    
    the code of the file until where you have to start completion: require 'action_dispatch/journey/gtg/transition_table'

module ActionDispatch
  module Journey # :nodoc:
 
    
        def firstpos(node)
          case node
          when Nodes::Star
            firstpos(node.left)
          when Nodes::Cat
            if nullable?(node.left)
              firstpos(node.left) | firstpos(node.right)
            else
              firstpos(node.left)
            end