DEADSOFTWARE

Реализованы неявные объявления типов наперёд
[dsw-obn.git] / test.c
diff --git a/test.c b/test.c
index 0837de4ef28f6ba05ca3dbe8f4c191e95fd0caa5..960bef8ce45254f4e7c788f012ec2e5fd7623c62 100644 (file)
--- a/test.c
+++ b/test.c
@@ -1,16 +1,22 @@
 #include "oberon.h"
+#include "generator.h"
 #include <assert.h>
 
 static const char source[] =
        "MODULE Test;"
+       "TYPE"
+       "       MyArr = ARRAY 3 OF INTEGER;"
+       "       MyArrPtr = POINTER TO MyArr;"
+       "       MyRec = POINTER TO MyRecDesc;"
+       "       MyRecDesc = RECORD next : POINTER TO MyRecDesc END;"
+       ""
        "VAR"
-       "       k : INTEGER;"
-       "       i : INTEGER;"
-       "       b : BOOLEAN;"
+       "       a : MyArr;"
+       "       b : MyArrPtr;"
+       "       c : MyRec;"
+       "       d : MyRecDesc;"
+       ""
        "BEGIN"
-       "       k := -10 + 1;"
-       "       i := k;"
-       "       b := ~TRUE OR FALSE;"
        "END Test."
 ;
 
@@ -22,6 +28,8 @@ 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;
 }