Exemplo n.º 1
0
        public void InterpreteJump()
        {
            AST    CurrentAST = Input.Read();
            string name       = ((AST)CurrentAST.Value).Value as string;
            int    result     = OutputManager.RetrieveLabelLocation(name);

            if (result == -1)
            {
                throw new InvalidStatementPassedException($"Label {name} was not registered. Please check your script again.");
            }
            Input.RecoverPosition(result);
        }