Skip to content

Instantly share code, notes, and snippets.

@nefo-mi
Created December 14, 2011 04:48
Show Gist options
  • Save nefo-mi/1475300 to your computer and use it in GitHub Desktop.
Save nefo-mi/1475300 to your computer and use it in GitHub Desktop.
VB.NETのタグファイルを作るスクリプト
#!/usr/local/bin/ruby
# Ref: http://homepage1.nifty.com/markey/memo/200406.html
tags = []
ARGF.each_line do |line|
ARGF.skip if /tags/i =~ ARGF.filename
if /(Sub|Function|Const|Property)\s+([^\s]+)\s*(\(|=)/ =~ line
tags.push "#{$2}\t#{ARGF.filename}\t/^#{line.chomp}$/;\"\tf"
end
if /Class/ =~ line && /End Class/ !~ line
tags.push "#{$2}\t#{ARGF.filename}\t/^#{line.chomp}$/;\"\tf"
end
end
puts tags.sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment