index 0837de4ef28f6ba05ca3dbe8f4c191e95fd0caa5..b934af876ca2bde9d44397015f95c7ce70953bd5 100644 (file)
--- a/test.c
+++ b/test.c
#include "oberon.h"
+#include "generator.h"
#include <assert.h>
static const char source[] =
"MODULE Test;"
+ "TYPE"
+ " MyRec = POINTER TO MyRecDesc;"
+ " MyRecDesc = RECORD"
+ " a : INTEGER;"
+ " END;"
"VAR"
- " k : INTEGER;"
- " i : INTEGER;"
- " b : BOOLEAN;"
- "BEGIN"
- " k := -10 + 1;"
- " i := k;"
- " b := ~TRUE OR FALSE;"
+ " r : MyRec;"
+ "BEGIN;"
+ " r := NIL;"
+ " r.a := 1;"
"END Test."
;
{
ctx = oberon_create_context();
mod = oberon_compile_module(ctx, source);
+ //mod -> begin();
+ oberon_generator_dump(ctx, "dump.txt");
oberon_destroy_context(ctx);
return 0;
}