override protected void Execute() { RihaNode variable = this.parameters[0]; ValueType type = GetValueType(words[3]); variable.SetType(type); RihaCompiler.AddToMemory(words[1], variable); }
public void set(string action, string[] words, RihaNode[] previuseActionResult) { //Patern set [varible_key] as [variable_type]; string setPattern = @"\s*set\s+\w+\s+as\s+\w+\s*"; if (MatchesRegex(action, setPattern)) { RihaNode varible = previuseActionResult[previuseActionResult.Length - 1]; ValueType type = GetValueType(words[3]); varible.SetType(type); variableMemory.Add(words[1], varible); } }