PageRenderTime 29ms CodeModel.GetById 25ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/deinverter

http://github.com/baryluk/cords
Perl | 12 lines | 8 code | 2 blank | 2 comment | 1 complexity | 33cc833d369e2f4d4f9c8b542372ad0e MD5 | raw file
 1#!/usr/bin/perl
 2
 3# simple script trying to convert D 2.0 ino D 1.0
 4
 5while (<>) {
 6	s/\b(invariant|const)\s*\(([^\)]+)\)/\2/g;
 7	s/\b(invariant|const)\s*\(([^\)]*\([^\)]+\)[^\)]*)\)/\2/g;
 8	s/\b(invariant|const)\s*\(([^\)]*\([^\)]*\([^\)]+\)[^\)]*\)[^\)]*)\)/\2/g;
 9	s/\b(invariant|const)\s*\(([^\)]*\([^\)]*\([^\)]*\([^\)]*\([^\)]+\)[^\)]*\)[^\)]*\)[^\)]*)\)/\2/g;
10	s/\b(invariant|const)\s+class\b/class/g;
11	print;
12}