Ticket #224: 0001-Added-support-for-Eiffel-.e-files-to-address-ticke.patch

File 0001-Added-support-for-Eiffel-.e-files-to-address-ticke.patch, 4.7 kB (added by f_k, 8 months ago)

Eiffel file support.

  • a/ext/ohcount_native/generator.rb

    old new  
    3737      dcl = DclMonoglot.new("dcl") 
    3838      dylan = CMonoglot.new("dylan",             '//',             nil,                true,  false) 
    3939      ebuild = CMonoglot.new("ebuild",           '#',              nil,                false, false) 
     40      eiffel = CMonoglot.new("eiffel",           '--',             nil,                true, false) 
    4041      erlang = CMonoglot.new("erlang",           '%%',             nil,                true,  true) 
    4142      exheres = CMonoglot.new("exheres",         '#',              nil,                false, false) 
    4243      java = CMonoglot.new("java",               '//',             [e('/*'), e('*/')], true,  false) 
     
    105106        dcl, 
    106107        dylan , 
    107108        ebuild , 
     109        eiffel , 
    108110        erlang , 
    109111        exheres , 
    110112        groovy , 
  • a/lib/ohcount/detector.rb

    old new  
    126126    #   '.cob'  => "cobol", 
    127127    '.cs'   => :disambiguate_cs, 
    128128    '.dylan'=> "dylan", 
     129    '.e'    => "eiffel", 
    129130    '.ebuild'=> "ebuild", 
    130131    '.eclass'=> "ebuild", 
    131132    '.kdebuild-1'=> "ebuild", 
  • a/lib/ohcount/sloc_info.rb

    old new  
    5656      'dcl'           => {:nice_name => 'DCL'              , :category => 0}, 
    5757      'dylan'         => {:nice_name => 'Dylan'            , :category => 0}, 
    5858      'ebuild'        => {:nice_name => 'Ebuild'           , :category => 0}, 
     59      'eiffel'        => {:nice_name => 'Eiffel'           , :category => 0}, 
    5960      'emacslisp'     => {:nice_name => 'Emacs Lisp'       , :category => 0}, 
    6061      'erlang'        => {:nice_name => 'Erlang'           , :category => 0}, 
    6162      'exheres'       => {:nice_name => 'Exheres'          , :category => 0}, 
  • /dev/null

    old new  
  • /dev/null

    old new  
     1class 
     2HELLO_WORLD 
     3create 
     4make 
     5feature 
     6make 
     7do 
     8print ("Hello, world!%N") 
     9end 
     10end 
  • /dev/null

    old new  
  • /dev/null

    old new  
     1class 
     2  HELLO_WORLD 
     3create 
     4  make 
     5feature 
     6  make 
     7    do 
     8      -- prints "Hello world!" and starts new line 
     9      print ("Hello, world!%N") 
     10    end 
     11end 
  • /dev/null

    old new  
     1require File.dirname(__FILE__) + '/../test_helper' 
     2 
     3class Ohcount::EiffelTest < Ohcount::Test 
     4  def test_comment 
     5    lb = [Ohcount::LanguageBreakdown.new("eiffel", "", "--comment", 0)] 
     6    assert_equal lb, Ohcount::parse(" --comment", "eiffel") 
     7  end 
     8 
     9  def test_comprehensive 
     10    verify_parse("eiffel.e") 
     11  end 
     12end