ext/cumo/narray/gen/cogen.rb in cumo-0.1.0 vs ext/cumo/narray/gen/cogen.rb in cumo-0.1.1

- old
+ new

@@ -2,15 +2,17 @@ thisdir = File.dirname(__FILE__) libpath = File.absolute_path(File.dirname(__FILE__))+"/../../../../lib" $LOAD_PATH.unshift libpath -require_relative "./narray_def" +require_relative "narray_def" +$line_number = false + while true if ARGV[0] == "-l" - require "erbpp/line_number" + $line_number = true ARGV.shift elsif ARGV[0] == "-o" ARGV.shift $output = ARGV.shift require "fileutils" @@ -31,9 +33,10 @@ erb_dir = ["tmpl"] erb_dir.unshift("tmpl_bit") if (type_name == "bit") erb_dir.map!{|d| File.join(thisdir,d)} code = DefLib.new do + set line_number: $line_number set erb_dir: erb_dir set erb_suffix: ".c" set ns_var: "mCumo" set file_name: $output||""