commit 7065bd3a1aef5da640f2c8829dfd042d88053d30
parent 9403daebc3a0b5cdde4635644e10f69b0cd82caf
Author: Tomas Hlavaty <tom@logand.com>
Date: Tue, 17 Jan 2012 00:23:29 +0100
remember enums
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/unoidl2java.c b/unoidl2java.c
@@ -27,6 +27,7 @@ extern const Any ast;
static Any module;
static Any typedefs;
+static Any enums;
static Any rel_package;
static Any uno_star_sun_com;
static Any Exception;
@@ -77,7 +78,8 @@ static void pr_package(Any class) {
}
}
-static void pr_enum(Any x) {
+static void pr_enum(Any x) { // (enum Name T ONE TWO (THREE 3))
+ enums = cons(cons(reverse(module, list1(cadr(x))), cdddr(x)), enums);
Any name = cadr(x);
Any published = caddr(x);
if(NIL != published) {
@@ -691,6 +693,7 @@ int main() {
yyparse();
module = NIL;
typedefs = NIL;
+ enums = NIL;
rel_package = NIL;
uno_star_sun_com = list4(mk(ID, "uno"), mk(ID, "star"), mk(ID, "sun"), mk(ID, "com"));
Exception = mk(ID, "Exception");
@@ -700,5 +703,6 @@ int main() {
Context = mk(ID, "Context");
pp_list(ast, NULL);
//print(typedefs);
+ //print(enums);
return 0;
}