summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Mike Barnett <mbarnett@microsoft.com>2011-05-03 08:20:17 -0700
committerGravatar Mike Barnett <mbarnett@microsoft.com>2011-05-03 08:20:17 -0700
commitdd73e7bad6c4acf5144c6c1e72c4d9db10588748 (patch)
treec6c0bf29e30a30e38df06438d5f80cdc61e832f2
parent6bbd1094f3251573e608180cde30927f069c589b (diff)
Fix creation of valid identifiers for methods with multi-dimensional
array arguments.
-rw-r--r--BCT/BytecodeTranslator/TranslationHelper.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/BCT/BytecodeTranslator/TranslationHelper.cs b/BCT/BytecodeTranslator/TranslationHelper.cs
index abc6b9b0..6b73c4b6 100644
--- a/BCT/BytecodeTranslator/TranslationHelper.cs
+++ b/BCT/BytecodeTranslator/TranslationHelper.cs
@@ -110,6 +110,10 @@ namespace BytecodeTranslator {
}
public static string TurnStringIntoValidIdentifier(string s) {
+ s = s.Replace("[0:,0:]", "2DArray"); // TODO: Do this programmatically to handle arbitrary arity
+ s = s.Replace("[0:,0:,0:]", "3DArray");
+ s = s.Replace("[0:,0:,0:,0:]", "4DArray");
+ s = s.Replace("[0:,0:,0:,0:,0:]", "5DArray");
s = s.Replace('(', '$');
s = s.Replace(')', '$');
s = s.Replace(',', '$');