array_specification_c may be used as a datatype! Add it to spec_init_separator_c
authormjsousa
Sun, 20 Jul 2014 03:14:57 +0100
changeset 912 252a69d6ecae
parent 911 ef3347dbfa0c
child 913 1c74da17cb61
array_specification_c may be used as a datatype! Add it to spec_init_separator_c
absyntax_utils/spec_init_separator.cc
absyntax_utils/spec_init_separator.hh
--- a/absyntax_utils/spec_init_separator.cc	Sun Jul 13 17:25:20 2014 +0100
+++ b/absyntax_utils/spec_init_separator.cc	Sun Jul 20 03:14:57 2014 +0100
@@ -134,6 +134,19 @@
   return NULL;
 }
 
+/* ARRAY '[' array_subrange_list ']' OF non_generic_type_name */
+/* NOTE: this symbol may be used directly in implictly defined variables in VAR_TEMP!! 
+ *       so we must consider it here too!
+ */
+void *spec_init_sperator_c::visit(array_specification_c *symbol) {
+  TRACE("spec_init_sperator_c::array_spec_init_c");
+  switch (search_what) {
+    case search_spec: return symbol;
+    case search_init: return NULL;
+  }
+  return NULL;
+}
+
 /* enumerated_specification ASSIGN enumerated_value */
 void *spec_init_sperator_c::visit(enumerated_spec_init_c *symbol) {
   TRACE("spec_init_sperator_c::enumerated_spec_init_c");
--- a/absyntax_utils/spec_init_separator.hh	Sun Jul 13 17:25:20 2014 +0100
+++ b/absyntax_utils/spec_init_separator.hh	Sun Jul 20 03:14:57 2014 +0100
@@ -85,6 +85,9 @@
   /* array_initialization may be NULL ! */
   void *visit(array_spec_init_c *symbol);
   
+  /* ARRAY '[' array_subrange_list ']' OF non_generic_type_name */
+  void *visit(array_specification_c *symbol);
+
   /* enumerated_specification ASSIGN enumerated_value */
   void *visit(enumerated_spec_init_c *symbol);