Correctly return the initial value of a string datatype, with limited length (STRING[33] := 'hello')
authorMario de Sousa <msousa@fe.up.pt>
Tue, 07 Feb 2012 12:17:00 +0000
changeset 432 9c5ad4be30fd
parent 431 5792016eedd8
child 433 1355adcdad58
Correctly return the initial value of a string datatype, with limited length (STRING[33] := 'hello')
absyntax_utils/type_initial_value.cc
--- a/absyntax_utils/type_initial_value.cc	Tue Feb 07 11:55:29 2012 +0000
+++ b/absyntax_utils/type_initial_value.cc	Tue Feb 07 12:17:00 2012 +0000
@@ -372,7 +372,9 @@
 					string_type_declaration_size,
 					string_type_declaration_init) /* may be == NULL! */
 #endif
-void *type_initial_value_c::visit(string_type_declaration_c *symbol)	{return NULL;}
+void *type_initial_value_c::visit(string_type_declaration_c *symbol)	{
+  return handle_type_spec(symbol->elementary_string_type_name, symbol->string_type_declaration_init);
+}
 
 
 type_initial_value_c	*type_initial_value_c::_instance = NULL;