public InterpreterStepResult Step() { stepResult = new InterpreterStepResult(); if (terminated) { stepResult.terminated = true; } else { string code = source[currentIndex].Split("//")[0]; if (code == string.Empty) { currentIndex++; //Next Line since this one is emtpy } else { if (Analyze(code)) { currentIndex++; currentWord = 1; } } DetectEnd(); } return(stepResult); }
public void FLDefines() { DebugHelper.ThrowOnAllExceptions = true; string file = Path.GetFullPath("resources/filter/defines/test.fl"); Interpreter P = new Interpreter(file, CLAPI.CreateEmpty <byte>(128 * 128 * 4, MemoryFlag.CopyHostPointer | MemoryFlag.ReadWrite), 128, 128, 1, 4, TestSetup.KernelDB); InterpreterStepResult ret = P.Step(); Assert.True(ret.DefinedBuffers.Count == 5); Assert.True(ret.DefinedBuffers[0] == "in_unmanaged"); Assert.True(ret.DefinedBuffers[1] == "textureD_internal"); Assert.True(ret.DefinedBuffers[2] == "textureC_internal"); Assert.True(ret.DefinedBuffers[3] == "textureB_internal"); Assert.True(ret.DefinedBuffers[4] == "textureA_internal"); }