Changeset 4efbf24ffad048c8ff32cac5823d1cc60935919e

Show
Ignore:
Timestamp:
03/31/2008 03:41:17 PM (9 months ago)
Author:
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
git-committer:
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1207003277 +0200
git-parent:

[48a9d9c1f0120b1d2d54b29749600fb98d10729a]

git-author:
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1205573623 +0100
Message:

add support for metafont and metapost

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ext/ohcount_native/generator.rb

    r2b58dd4 r4efbf24  
    4343      lua = CMonoglot.new("lua",                 '--',             nil,                true,  true) 
    4444      matlab = CMonoglot.new("matlab",           '#|%',            ['{%', '%}'], false,true) 
     45      metafont = LineCommentMonoglot.new("metafont", "%"); 
     46      metapost = LineCommentMonoglot.new("metapost", "%"); 
    4547      objective_c = CMonoglot.new("objective_c", '//',             [e('/*'), e('*/')], true,  false) 
    4648      pascal = CMonoglot.new("pascal",           '//',             ['{','}'],          true,  true, {:no_escape_dquote => true, :no_escape_squote => true}) 
     
    6971      dmd = DMonoglot.new('dmd') 
    7072      tex = CMonoglot.new("tex",             '%',              nil,                false, false) 
     73      metapost_with_tex = Biglot.new('metapost_with_tex', metapost, tex, [], [ 
     74        ["verbatimtex", :metapost_code, :tex_code, :from, false, 'verbatim'], 
     75        ["btex", :metapost_code, :tex_code, :from, false, 'btex'], 
     76        ["etex", :tex_code, :return, :to, false, 'etex'] 
     77      ]); 
    7178      polyglots = [ 
    7279        ada , 
     
    93100        lua , 
    94101        matlab, 
     102        metafont, 
     103        metapost, 
    95104        objective_c, 
    96105        pascal , 
     
    119128        jsp, 
    120129        clearsilver_template, 
    121         tex 
     130        tex, 
     131        metapost_with_tex 
    122132      ] 
    123133      File.open("polyglots.c", "w") do |io| 
  • lib/ohcount/detector.rb

    rd7e4b3c r4efbf24  
    154154    '.lisp' => "lisp", 
    155155    '.m'    => :matlab_or_objective_c, 
     156    '.mf'   => 'metafont', 
    156157    '.mm'   => "objective_c", 
     158    '.mp'   => 'metapost_with_tex', 
    157159    '.pas'  => "pascal", 
    158160    '.pp'   => "pascal", 
  • lib/ohcount/sloc_info.rb

    rd7e4b3c r4efbf24  
    6363      'lua'           => {:nice_name => 'Lua'              , :category => 0}, 
    6464      'matlab'        => {:nice_name => 'Matlab'           , :category => 0}, 
     65      'metafont'      => {:nice_name => 'MetaFont'         , :category => 1}, 
     66      'metapost'      => {:nice_name => 'MetaPost'         , :category => 1}, 
    6567      'objective_c'   => {:nice_name => 'Objective C'      , :category => 0}, 
    6668      'pascal'        => {:nice_name => 'Pascal'           , :category => 0},