Skip C comments from scan target; close #5072

The original PR was skipping Ruby comments as well, but caused some
issues in test suites.
parent a4c5824e
...@@ -163,6 +163,7 @@ op_table = { ...@@ -163,6 +163,7 @@ op_table = {
file presym_file => cfiles+rbfiles+psfiles+[__FILE__] do file presym_file => cfiles+rbfiles+psfiles+[__FILE__] do
csymbols = cfiles.map do |f| csymbols = cfiles.map do |f|
src = File.read(f) src = File.read(f)
src.gsub!(/\/\/.+(\n|$)/, "\n")
[src.scan(/intern_lit\([^\n"]*"([^\n "]*)"/), [src.scan(/intern_lit\([^\n"]*"([^\n "]*)"/),
src.scan(/mrb_define_method\([^\n"]*"([^\n"]*)"/), src.scan(/mrb_define_method\([^\n"]*"([^\n"]*)"/),
src.scan(/mrb_define_class_method\([^\n"]*"([^\n"]*)"/), src.scan(/mrb_define_class_method\([^\n"]*"([^\n"]*)"/),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment