예제 #1
0
        void run_keyword_statement(Statement statement)
        {
            var s = (KeywordStatement)statement;

            if (s.keyword.type == TokenType.Del)
            {
                if (s.var_name != null)
                {
                    symbol_table.del(s.var_name, s.LineNumber);
                }

                else if (s.slice_expression != null)
                {
                    s.slice_expression.del(symbol_table);
                }

                prog_counter++;
            }
            else
            {
                throw new Exception("statement not supported");
            }
        }