[svn] r5861: nemerle/trunk/misc/to-indentation-syntax.pl

malekith svnadmin at nemerle.org
Fri Oct 28 00:40:51 CEST 2005


Log:
A simple conversion script.

Author: malekith
Date: Fri Oct 28 00:40:51 2005
New Revision: 5861

Added:
   nemerle/trunk/misc/to-indentation-syntax.pl   (contents, props changed)

Added: nemerle/trunk/misc/to-indentation-syntax.pl
==============================================================================
--- (empty file)
+++ nemerle/trunk/misc/to-indentation-syntax.pl	Fri Oct 28 00:40:51 2005
@@ -0,0 +1,11 @@
+#!/usr/bin/perl -i
+
+while (<>) {
+  chomp;
+  next if (/^\s*[{}]\s*$/);
+  s/\s*{\s*$//;
+  s/^(\s*)}\s*/$1/;
+  s/;\s*$//;
+  s/^(\s*\[[A-Z].*\])\s*$/$1 \\/;
+  print "$_\n";
+}



More information about the svn mailing list