DEADSOFTWARE

Реализованы неявные объявления типов наперёд
[dsw-obn.git] / test.c
diff --git a/test.c b/test.c
index da6a8041e833c307ff423b8411513067390e8c53..960bef8ce45254f4e7c788f012ec2e5fd7623c62 100644 (file)
--- a/test.c
+++ b/test.c
@@ -1,23 +1,22 @@
 #include "oberon.h"
+#include "generator.h"
 #include <assert.h>
 
 static const char source[] =
        "MODULE Test;"
-       "VAR"
-       "       k : INTEGER;"
-       "       i : INTEGER;"
-       "       b : BOOLEAN;"
+       "TYPE"
+       "       MyArr = ARRAY 3 OF INTEGER;"
+       "       MyArrPtr = POINTER TO MyArr;"
+       "       MyRec = POINTER TO MyRecDesc;"
+       "       MyRecDesc = RECORD next : POINTER TO MyRecDesc END;"
        ""
-       "PROCEDURE Tier;"
-       "BEGIN"
-       "       k := 314;"
-       "END Tier;"
+       "VAR"
+       "       a : MyArr;"
+       "       b : MyArrPtr;"
+       "       c : MyRec;"
+       "       d : MyRecDesc;"
        ""
        "BEGIN"
-       "       k := 1;"
-       "       i := k;"
-       "       b := TRUE;"
-       "       Tier;"
        "END Test."
 ;
 
@@ -30,6 +29,7 @@ main(int argc, char ** argv)
        ctx = oberon_create_context();
        mod = oberon_compile_module(ctx, source);
        //mod -> begin();
+       oberon_generator_dump(ctx, "dump.txt");
        oberon_destroy_context(ctx);
        return 0;
 }