I'm working developer tool and in it you are able to export HTML. It also saves to its own file format(not html). With this tool I'm exporting, replacing and generating code but I'm not sure what the terminology is for each of the things I'm doing.
In a developer tool I have a design view and a option to export to HTML. Based on the user setting options in one of the panels I'll add additional code around the HTML generated markup code. This happens in the code of the tool when the user clicks export. Is this a preprocessing instruction?
Later the user saves their file I save this information, the instructions to add additional code on export, into the text file. Is this called directives?
What are mix ins?
I hope this makes sense.
Also, the tool, generates HTML markup and in the example above inserts some code above. Is this a compiler?
UPDATE:
This has to with a project with the Flash Player Virtual Machine and ActionScript so the language with words such as "mixins", "preprocessing" and "[compiler] directives" may be localized to this field. I'm guessing that's why people are downvoting. I think someone should be required to leave a comment if they downvote the original post.
I'll try and answer some of the questions that I think you're asking.
What is preprocessing in the context of ActionScript 3?
Preprocessing means executing a pre-compilation macro language that modifies the code just before it gets compiled. The closest thing to a preprocessor for ActionScript3 that I can find is the MXMLC compiler for the Flex SDK, which does support something equivalent to #define
s.
This is what you call a compiler directive, as evidenced in MXMLC's documentation on conditional compilation.
What are mix ins?
According to Adobe, "A mixin provides an easy way to dynamically add the methods of an existing class to a custom class without using inheritance. You mix in the class, and then add that class's members to the prototype object of the custom class."
Based on the user setting options in one of the panels I'll add additional code around the HTML generated markup code. This happens in the code of the tool when the user clicks export. Is this a preprocessing instruction?
Depending on what this additional code looks like, you could call it template code if it's just regular ActionScript3 code. If what you are adding is additional methods to existing classes, call it mixins. If you're just adding extra code, you could call it a mixin and conflict with Adobe's terminology, which is probably not desirable.
Your tool itself could be regarded as a kind of preprocessor - I would expect that a preprocessor uses hints given in the code (e.g. using specific preprocessor directives like #define
, or the ActionScript3 code itself) to transform the code.
With regards to the formulation of your question, I feel that it's asked a little backwards. I might phrase the same question like this (assuming I understood it correctly):
In ActionScript3, what is the difference between the terms preprocessing, directives and mixins? The reason I am asking is because I'm making a developer tool that takes in ActionScript3 code and adds additional code around it. For the GUI of this tool, I have to refer to this code, and I am not sure if any of these three words qualify.