about summary refs log tree commit diff stats
path: root/cpp/relayout
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-17 11:04:58 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-17 11:04:58 -0700
commitc18e17f22feaf308376f53f2f61775ddad0e4a9d (patch)
tree73dac4575e99fae53434a52ed9642d9e2cf94ca3 /cpp/relayout
parentc495d2ac7ca0d7f1c1a9bbb7d1ad5072a7eface5 (diff)
downloadmu-c18e17f22feaf308376f53f2f61775ddad0e4a9d.tar.gz
1076
Diffstat (limited to 'cpp/relayout')
-rwxr-xr-xcpp/relayout7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/relayout b/cpp/relayout
index e0b38c4b..c99f418f 100755
--- a/cpp/relayout
+++ b/cpp/relayout
@@ -1,6 +1,9 @@
 #!/usr/bin/env zsh
 # Helper to change the numerical prefixes across the repo, say if you want to
 # create room between 023 and 024, and so on.
+#
+# Assumes there's only ever one file with any numeric prefix. If you move
+# 002trace.tests you might need to do some manual patch-up.
 
 setopt extendedglob
 
@@ -20,7 +23,7 @@ fi
 #
 
 index=0
-ls [0-9]* |grep -v "^002trace.tests$" |sort -n |perl -pwe 's/\..*//' |
+ls [0-9]* |grep -v "^002trace.tests$" |sort -n
   while read file
   do
     echo $file >&2
@@ -38,7 +41,7 @@ vim -c "set nu" .layout
 #
 
 root() {
-  echo $1 |perl -pwe 's/^[0-9]*//' |perl -pwe 's/\..*//'
+  echo $1 |perl -pwe 's/^[0-9]*//'
 }
 
 index=0
0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
discard """
  cmd: '''nim c --styleCheck:hint $file'''
  nimout: '''
tlinter.nim(21, 14) Hint: 'nosideeffect' should be: 'noSideEffect' [Name]
tlinter.nim(21, 28) Hint: 'myown' should be: 'myOwn' [template declared in tlinter.nim(19, 9)] [Name]
tlinter.nim(21, 35) Hint: 'inLine' should be: 'inline' [Name]
tlinter.nim(25, 1) Hint: 'tyPE' should be: 'type' [Name]
tlinter.nim(23, 1) Hint: 'foO' should be: 'foo' [proc declared in tlinter.nim(21, 6)] [Name]
tlinter.nim(27, 14) Hint: 'Foo_bar' should be: 'FooBar' [type declared in tlinter.nim(25, 6)] [Name]
tlinter.nim(29, 6) Hint: 'someVAR' should be: 'someVar' [var declared in tlinter.nim(27, 5)] [Name]
tlinter.nim(32, 7) Hint: 'i_fool' should be: 'iFool' [Name]
tlinter.nim(39, 5) Hint: 'meh_field' should be: 'mehField' [Name]
'''
  action: "compile"
"""



{.pragma: myOwn.}

proc foo() {.nosideeffect, myown, inLine.} = debugEcho "hi"

foO()

tyPE FooBar = string

var someVar: Foo_bar = "a"

echo someVAR

proc main =
  var i_fool = 34
  echo i_fool

main()

type
  Foo = object
    meh_field: int