Posted 18 years ago
by Russell Mason
Hi
In the Simple language (4.0 sample) am I right in thinking the CompilationUnit class was manually changed or have I missed something in the XML language file it was generated from?
If this is the case and the documentation says use these as templates and that it is likely you would change the AST classes, would it be possible to add an attribute to the XML that allows the generation of partial classes? (i.e. just outputs the word 'partial' in front of any class with the corresponding attribute set).
I think this would need to be applicable to any generated class, not just AST based ones.
If the attribute is not set then don't output the keyword (i.e. for .net 1.0, 1.1 compatibility).
This means that these files can be regenerated without affecting the manually written bits. This could be manually set against each class once generated but the attribute method would save a lot of time and potential mistakes.
Thanks
Russell Mason
In the Simple language (4.0 sample) am I right in thinking the CompilationUnit class was manually changed or have I missed something in the XML language file it was generated from?
If this is the case and the documentation says use these as templates and that it is likely you would change the AST classes, would it be possible to add an attribute to the XML that allows the generation of partial classes? (i.e. just outputs the word 'partial' in front of any class with the corresponding attribute set).
I think this would need to be applicable to any generated class, not just AST based ones.
If the attribute is not set then don't output the keyword (i.e. for .net 1.0, 1.1 compatibility).
This means that these files can be regenerated without affecting the manually written bits. This could be manually set against each class once generated but the attribute method would save a lot of time and potential mistakes.
Thanks
Russell Mason