Fixed syntax problems in generated code
authorRick van Rein <rick@openfortress.nl>
Fri, 1 Jul 2016 19:51:21 +0000 (20:51 +0100)
committerRick van Rein <rick@openfortress.nl>
Fri, 1 Jul 2016 19:51:21 +0000 (20:51 +0100)
 - fixed trailing \\ at end of lines, made it \
 - fixed DER_APPLICATION_TAG and DER_CONTEXT_TAG, made it DER_TAG_xxx

asn1ate/asn2quickder.py

index a054771..cd06121 100755 (executable)
@@ -170,7 +170,7 @@ class QuickDERgen():
 
     def packTypeAssignment(self, node):
         self.wout('#define DER_PACK_' + self.unit + '_' + toCsym(node.type_name))
-        self.newcomma(', \\\\\n\t', ' \\\\\n\t')
+        self.newcomma(', \\\n\t', ' \\\n\t')
         self.generate_pack_node(node.type_decl)
         self.wout('\n\n')
 
@@ -204,7 +204,7 @@ class QuickDERgen():
         #TODO# Need to push down node.implicity == TagImplicity.IMPLICIT
         #TODO# Need to process tag class
         self.comma()
-        self.wout('DER_PACK_ENTER | DER_' +(node.class_name or 'CONTEXT') + '_TAG(' + node.class_number + ')')
+        self.wout('DER_PACK_ENTER | DER_TAG_' +(node.class_name or 'CONTEXT') + '(' + node.class_number + ')')
         self.generate_pack_node(node.type_decl)
         self.comma()
         self.wout('DER_PACK_LEAVE')