You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@{varitems="";if(@Model.definitions.nestedFunctions.Public.Count>0){items+="*\n";items+="* IF CallIsCopy\n";items+="* PERFORM Copy-Process-Mode\n";items+="* ELSE\n";items+=" PERFORM FctList-Process-Mode\n";items+=" perform INIT-LIBRARY\n";items+="* END-IF\n\n";items+=" GOBACK.\n\n";items+=" FctList-Process-Mode.\n";items+=" IF NOT TC-"+@Model.programName8+"-FctList-IsLoaded\n";foreach(varfin@Model.definitions.nestedFunctions.Concat(@Model.definitions.functions.Public,true)){items+=" SET TC-"+@Model.programName8+"-"+f.Hash+" TO ENTRY '"+f.Hash+"'\n";}items+=" SET TC-"+@Model.programName8+"-FctList-IsLoaded TO TRUE\n";items+=" END-IF\n";items+=" .\n\n";if(@Model.definitions.nestedFunctions.Public.Count>0){items+=" set PntTab-Pnt TO ADDRESS OF TC-"+@Model.programName8+"-PntTab\n";}}}
@items
the resulting transpiled code is the following
@SelfResult.Append(@"");varitems="";if(@Model.definitions.nestedFunctions.Public.Count>0){items+="*\n";items+="* IF CallIsCopy\n";items+="* PERFORM Copy-Process-Mode\n";items+="* ELSE\n";items+=" PERFORM FctList-Process-Mode\n";items+=" perform INIT-LIBRARY\n";items+="* END-IF\n\n";items+=" GOBACK.\n\n";items+=" FctList-Process-Mode.\n";items+=" IF NOT TC-"+@Model.programName8+"-FctList-IsLoaded\n";foreach(varfin@Model.definitions.nestedFunctions.Concat(@Model.definitions.functions.Public,true)){items+=" SET TC-"+@Model.programName8+"-"+f.Hash+" TO ENTRY '"+f.Hash+"'\n";}items+=" SET TC-"+@Model.programName8+"-FctList-IsLoaded TO TRUE\n";items+=" END-IF\n";items+=" .\n\n";if(@Model.definitions.nestedFunctions.Public.Count>0){items+=" set PntTab-Pnt TO ADDRESS OF TC-"+@Model.programName8+"-PntTab\n";@SelfResult.Append(@" } }");@SelfResult.Append(@" ");@SelfResult.Append($@"{@items}");@SelfResult.Append(@"");
The problem is that the two last } } brackets are considered by the CSharpCodeParser as Markup text thus the Tranpiler generates a String construction like:
@SelfResult.Append(@" } }");
This a Microsoft .Razor issue to be investigated, by taking the original CSharpCodeParser and seing what is wrong.
A work around for this issue is to transform the script like for instance like that:
@{varitems="";if(@Model.definitions.nestedFunctions.Public.Count>0){items+="*\n";items+="* IF CallIsCopy\n";items+="* PERFORM Copy-Process-Mode\n";items+="* ELSE\n";items+=" PERFORM FctList-Process-Mode\n";items+=" perform INIT-LIBRARY\n";items+="* END-IF\n\n";items+=" GOBACK.\n\n";items+=" FctList-Process-Mode.\n";items+=" IF NOT TC-"+@Model.programName8+"-FctList-IsLoaded\n";foreach(varfin@Model.definitions.nestedFunctions.Concat(@Model.definitions.functions.Public,true))items+=" SET TC-"+@Model.programName8+"-"+f.Hash+" TO ENTRY '"+f.Hash+"'\n";items+=" SET TC-"+@Model.programName8+"-FctList-IsLoaded TO TRUE\n";items+=" END-IF\n";items+=" .\n\n";if(@Model.definitions.nestedFunctions.Public.Count>0)items+=" set PntTab-Pnt TO ADDRESS OF TC-"+@Model.programName8+"-PntTab\n";}}
@items
AND the generated code will be:
@SelfResult.Append(@"");varitems="";if(@Model.definitions.nestedFunctions.Public.Count>0){items+="*\n";items+="* IF CallIsCopy\n";items+="* PERFORM Copy-Process-Mode\n";items+="* ELSE\n";items+=" PERFORM FctList-Process-Mode\n";items+=" perform INIT-LIBRARY\n";items+="* END-IF\n\n";items+=" GOBACK.\n\n";items+=" FctList-Process-Mode.\n";items+=" IF NOT TC-"+@Model.programName8+"-FctList-IsLoaded\n";foreach(varfin@Model.definitions.nestedFunctions.Concat(@Model.definitions.functions.Public,true)){items+=" SET TC-"+@Model.programName8+"-"+f.Hash+" TO ENTRY '"+f.Hash+"'\n";}items+=" SET TC-"+@Model.programName8+"-FctList-IsLoaded TO TRUE\n";items+=" END-IF\n";items+=" .\n\n";if(@Model.definitions.nestedFunctions.Public.Count>0){items+=" set PntTab-Pnt TO ADDRESS OF TC-"+@Model.programName8+"-PntTab\n";}}@SelfResult.Append($@"{@items}");@SelfResult.Append(@"");
The text was updated successfully, but these errors were encountered:
The Script below is not translated correctly.
the resulting transpiled code is the following
The problem is that the two last } } brackets are considered by the CSharpCodeParser as Markup text thus the Tranpiler generates a String construction like:
This a Microsoft .Razor issue to be investigated, by taking the original CSharpCodeParser and seing what is wrong.
A work around for this issue is to transform the script like for instance like that:
AND the generated code will be:
The text was updated successfully, but these errors were encountered: