VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
static int AVR.Core.AVR_SettingsParser.parseDepth ( string  context,
int  i,
List< string >  content,
Dictionary< string, string >  entries 
)
inlinestaticprivate

Definition at line 69 of file AVR_SettingsParser.cs.

69  {
70  while (i < content.Count)
71  {
72  if (content[i] == "}") return i + 1;
73  // For custom tokens
74  //else if (content[i].equals("$embededCSV") && content[i + 1].equals("="))
75  //{
76  // parseEmbededCSV(context, content[i + 2]);
77  // i += 3;
78  //}
79  //else if (content[i].equals("$embededJSON") && content[i + 1].equals("="))
80  //{
81  // parseEmbededJSON(context, content[i + 2]);
82  // i += 3;
83  //}
84  else if (is_identifier(content[i]) && content[i + 1]=="=" && content[i + 2]=="{")
85  {
86  i = parseDepth(context + "/" + content[i], i + 3, content, entries);
87  }
88  else if (is_identifier(content[i]) && content[i + 1]=="=")
89  { //We dont care if content[i+2] is an identifier, because quotation-strings are also values.
90  entries[context + "/" + content[i]] = content[i + 2];
91  i += 3;
92  }
93  else
94  {
95  AVR.Core.AVR_DevConsole.cerror("Incorrect Token Syntax at (index "+i+"): " + content[i] + " " + content[i + 1] + " " + content[i + 2], "SettingsParser");
96  return int.MaxValue;
97  }
98  }
99  return i;
100  }
static int parseDepth(string context, int i, List< string > content, Dictionary< string, string > entries)
static bool is_identifier(string str)