Ejemplo n.º 1
0
        public override string VisitDeclarationBlock([NotNull] QPILE_converterV2Parser.DeclarationBlockContext context)
        {
            //res = context.children[1].ToString() + " " + context.children[2].ToString() + " " + context.children[3].ToString();
            table = context.children[1].GetText();
            int n = table.LastIndexOf(";");

            if (n == table.Length - 1)
            {
                table = table.Remove(n);
            }
            create_table += "    " + table + " = AllocTable();\n";
            main_funk    += "    CreateTable();\n";
            string window_caption = context.children[5].GetText();

            window_caption      = window_caption.Remove(window_caption.Length - 1);
            create_table_delta += "    t = CreateWindow(" + table + ");\n" + "    SetWindowCaption(" + table + "," + '"' + window_caption + '"' + ");\n";
            end_script         += "function OnStop()\n" + "    sIsRun = false;\n" + "    if " + table + " ~= nil then\n";
            end_script         += "        DestroyTable(" + table + ");\n" + "    end;\n" + "end;";
            return(table + " = {}");

            return(base.VisitDeclarationBlock(context));
        }
Ejemplo n.º 2
0
 public override string VisitDeclarationBlock([NotNull] QPILE_converterV2Parser.DeclarationBlockContext context)
 {
     return(base.VisitDeclarationBlock(context));
 }