-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give up Razor and Skeleton for Code Generation #1028
Comments
Just to be sure, we can give up Razor for all the generation process. |
Here's what we need for our codegen:
Each generator is assembled with different sub-generators for each concepts of TypeCobol:
For each concepts listed here, we could choose to do nothing during codegen because the target compiler support the feature. |
:: Is handled by a C# code and not by Razor, even if there is an action called Qualifier, this action is first called before any Razor or Skeleton action. |
For the requirements (Needs), yes the new Codegen must effectively support various generation scheme, so it must be flexible and customizable, and Node directed. |
Another Idea for code generation customization, is to be driven by the parser, that is to say to use the same Cup parser used to create the AST, but now to perform CodeGen action on specific nodes, while still being Node directed. |
Ok this is another Idea: It seems to be in contradiction, but why give up razor and skeleton? Why not create our skeleton C# code generator tool. The tool will take our current Skeleton.xml file and generates a Skeleton.cs file to be compiled. The Skeleton.cs file will not call razor or use razor , but it will contains substituted code for all razor pattern as C# code for condition's type node. I like this idea. So it will be possible to generate various Skeleton.cs file depending on options or output format. BUT OF COURSE WE GIVE UP RAZOR, but we keep its pattern syntax. |
…n interpret Razor Language, using a Custom C# parser on expressions and statements. We can validate pattern based on Razor Syntax using System.Web.Razor.RazorParser against C# and HtmlMarkup code parser. Using Razor parser we can imagine to apply a Benoit Sarter idea to use TypeCobolParser syntax inside razor pattern #1028.
According to issue #991 it came that with current translation templates based on Razor scripts, we fail to generate an exact code for situations like thoses described in #991.
So we need to write C# code for handling function declaration code generation.
Sub-tasks:
...To complete
The text was updated successfully, but these errors were encountered: