Created
April 4, 2019 06:10
-
-
Save YOCKOW/7870ef5859400c9f6adf6b6815214f94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| require 'open-uri' | |
| MANGLING_RST_URI = "https://raw.githubusercontent.com/YOCKOW/swift/following-apple/docs/ABI/Mangling.rst" | |
| open(MANGLING_RST_URI) {|file| | |
| file.each_line {|line| | |
| next if line !~ /^\p{Zs}*([^\p{Zs}]+\p{Zs}::=.+)$/ | |
| modified_line = $1 | |
| modified_line.sub!(%r{\p{Zs}*//.*$}, '') | |
| puts(modified_line) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment