# HG changeset patch # User Manuele Conti # Date 1354447841 -3600 # Node ID d0c5c63a0cbf1519121ab63686d0062418e50aa1 # Parent adc632c96c503bcf47713a96cd8a43065f0a7b95 Fix enum conversion function to string. diff -r adc632c96c50 -r d0c5c63a0cbf stage1_2/create_enumtype_conversion_functions.cc --- a/stage1_2/create_enumtype_conversion_functions.cc Wed Nov 28 22:51:24 2012 +0100 +++ b/stage1_2/create_enumtype_conversion_functions.cc Sun Dec 02 12:30:41 2012 +0100 @@ -196,12 +196,12 @@ IN: ; END_VAR IF IN = THEN - _TO_STRING := ''; + _TO_STRING := '#'; RETURN; END_IF; ... IF IN = THEN - _TO_STRING := ''; + _TO_STRING := '#'; RETURN; END_IF; ENO := FALSE; @@ -219,7 +219,7 @@ for (itr = enumerateValues.begin(); itr != enumerateValues.end(); ++itr) { std::string value = *itr; text += "IF IN = " + value + " THEN\n"; - text += " " + functionName + " := '" + value + "';\n"; + text += " " + functionName + " := '" + enumerateName + "#" + value + "';\n"; text += " RETURN;\n"; text += "END_IF;\n"; }