diff --git a/dsc b/dsc index 2b12e81..d388852 100755 Binary files a/dsc and b/dsc differ diff --git a/fcore/quad-tree.sml b/fcore/quad-tree.sml index d36ef1b..7b18f63 100644 --- a/fcore/quad-tree.sml +++ b/fcore/quad-tree.sml @@ -1,5 +1,27 @@ structure CollisionTree = struct + local + fun finish acc = + let val acc = List.rev acc + in String.implode acc + end + + fun loop (#"-" :: chr :: tl, acc) = + let val acc = Char.toUpper chr :: acc + in loop (tl, acc) + end + | loop ([#"-"], acc) = finish acc + | loop (chr :: tl, acc) = + loop (tl, chr :: acc) + | loop ([], acc) = finish acc + in + fun kebabCaseToPascalCase str = + (* capitalise first character in string *) + case String.explode str of + chr :: tl => let val chr = Char.toUpper chr in loop (tl, [chr]) end + | [] => "" + end + structure BinTree = struct datatype 'a bintree = diff --git a/imperative-shell/converter.sml b/imperative-shell/converter.sml index 5aaa4bc..46a8c79 100644 --- a/imperative-shell/converter.sml +++ b/imperative-shell/converter.sml @@ -5,7 +5,7 @@ struct SOME line => loadIO (io, str ^ line) | NONE => str - fun convertFile fullPath = + fun convertFile (fullPath, filename) = let val io = TextIO.openIn fullPath val text = loadIO (io, "") @@ -57,7 +57,7 @@ struct () else if endsWithDsc path then (* is a file ending with .dsc extension *) - convertFile folderPath + convertFile (folderPath, path) else (* is a file but doesn't end with .dsc, so ignore *) ()