lib/pry-doc/pry_ext/show_source_with_c_internals/c_file.rb
# Used to separate symbol from line number
Used to separate symbol from line number
Used to separate symbol from line number
def symbol_type_for(symbol)
        if symbol =~ /#\s*define/
          :macro
        elsif symbol =~ /\bstruct\b/
          :struct
        elsif symbol =~ /\benum\b/
          :enum
        elsif symbol.start_with?("}")
          :typedef_struct
        elsif symbol =~/^typedef.*;$/
          :typedef_oneliner
        elsif symbol =~ /\($/
          :function
        else
          :unknown
        end
      end
def symbol_type_for ( symbol ) if symbol =~ / # \s *define / :macro elsif symbol =~ / \b struct \b / :struct elsif symbol =~ / \b enum \b / :enum elsif symbol . start_with? ( "}" ) :typedef_struct elsif symbol =~ / ^typedef.*;$ / :typedef_oneliner elsif symbol =~ / \( $ / :function else :unknown end end
Used to separate symbol from line number
Used to separate symbol from line number
symbol