aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1compiler
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-08-22 03:10:23 +0000
committerLev Walkin <vlm@lionet.info>2004-08-22 03:10:23 +0000
commit6fec44d9b2421ac4e556f8b9d21c53c4ad78f629 (patch)
tree3a72a8c8240fc64de40d5ac180cd9d594cd4ea22 /libasn1compiler
parent4ec3b4c088904c50ffc8c8ad06e11214d964e8c4 (diff)
refactoring
Diffstat (limited to 'libasn1compiler')
-rw-r--r--libasn1compiler/asn1c_out.h2
-rw-r--r--libasn1compiler/asn1compiler.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/libasn1compiler/asn1c_out.h b/libasn1compiler/asn1c_out.h
index f604687b..7e2abfd8 100644
--- a/libasn1compiler/asn1c_out.h
+++ b/libasn1compiler/asn1c_out.h
@@ -69,6 +69,8 @@ int asn1c_compiled_output(arg_t *arg, const char *fmt, ...);
_tmp.default_cb(&_tmp); \
); \
arg->embed--; \
+ if(ev->expr_type != A1TC_EXTENSIBLE) \
+ OUT(";\n"); \
assert(arg->target->target == OT_TYPE_DECLS); \
REDIR(saved_target); \
} while(0)
diff --git a/libasn1compiler/asn1compiler.c b/libasn1compiler/asn1compiler.c
index dd51156f..0159da15 100644
--- a/libasn1compiler/asn1compiler.c
+++ b/libasn1compiler/asn1compiler.c
@@ -84,6 +84,9 @@ asn1c_compile_expr(arg_t *arg) {
expr->_lineno);
ret = type_cb(arg);
+
+ if(arg->target->destination[OT_TYPE_DECLS].indent_level == 0)
+ OUT(";\n");
} else {
ret = -1;
/*
@@ -112,6 +115,11 @@ asn1c_compile_expr(arg_t *arg) {
}
if(ret == -1) {
+ FATAL("Cannot compile \"%s\" (%x:%x) at line %d",
+ arg->expr->Identifier,
+ arg->expr->expr_type,
+ arg->expr->meta_type,
+ arg->expr->_lineno);
OUT("#error Cannot compile \"%s\" (%x/%x) at line %d\n",
arg->expr->Identifier,
arg->expr->meta_type,