The basic structure of a module file:
Settings: ... Types: ... Structs: ... StartingNodes: ... Nodes: ...
The settings area contains settings about the language that can be changed, such as separator, and the main documentation link
Settings: // Syntax is name=value doc-link=https://link-to-documentation-root separator=;\n extension=c var-fmt=%name var-decl=%type %name var-sign=%name = %val decl-sign=%type %name = %val
The root of the documentation link, the links for the nodes will be appended to this one, just to avoid repeating the full url for every node
The separator will be placed between statements. For C it would be a semi-colon and line break
The file extension to use when exporting code
The format for variable names, where %name is replaced with the name. This is used for languages like PHP where variables must be prefixed with a symbol.
The format to use for variable declaration, where %type is replaced with the type, and %name is replaced with the name. This will be used when a variable is referenced for the first time. JavaScript for example would be let %name or var %name
The format to use for assigning to variables, where %name is replaced with the name, and %val is replaced with the value
The format to use for assigning to a new variable, where %type is the type, %name is the name, and %val is the value
These are the building-block types, stuff like int, and bool
Types: // Syntax is name, letter, unconnected icon, connected icon, colour, output, input tag type bool, b, circle-thin, circle, #FF0000, %, checkbox float, f, circle-thin, circle, #00FF00, %f, number
Name of the type
The id used in the node IO, I'd recommend keeping it to a few letters
The Font Awesome 4 Icon to use on unconnected nubs
The Font Awesome 4 Icon to use on connected nubs
Colour that represents that type, it will influence the icon, gradients, and lines connecting nubs
The format for the input value, where % will be replaced. To make a string type you would put in "%"
Type attribute for the input tag to make values
Instead of list form, structs are multi-line
Name Colour Is Static (can't be broken or made) [ // List of properties ] ( // List of methods ) Documentation-link Vector #0000FF false [ // name, type, read-write, documentation-link x, float, rw, doc-link y, float, rw, doc-link z, float, rw, doc-link // If there's an r, a Get node will be created, and if there's a w, a Set node will be created ] ( // name, IO, documentation-link GetLength, o.;f.;, doc-link // The IO is explained in the nodes section ) Documentation-link // The empty line between structs is important
The starting nodes section is the same as the nodes section, except that these will spawn when you make a new document. Here you'd put the starting point and/or some crucial nodes that every document needs.
// Name, Type, Output, IO, Doc-Link Equal (==), 1, (%0 == %1), g.A;g.B;o.;b.;, link
Name of the node
Number defining the type.
The output of the node, where %0 will be replaced with the first parameter, %1 with the second, and so on.
%o0 is the first output, %o1 is the second output and so on.
%c is the same as %o except it doesn't indent.
%s is the same as %c except it stops after the first node, and there's no separator
The syntax for each nub is type.name;
Type is the letter code given in the types section
o.; splits the inputs and outputs, so to create a node with one execution input and a boolean output, it would be:
e.NameOfExec; o.; b.NameOfBool;
But you can't have spaces between nubs so it would be squished together like
e.NameOfExec;o.;b.NameOfBool;
The name can be left empty, in which case it would just be type.;
Nubs can have modifiers put at the beginning to change the nub
n.e.ExecNub;
The doc-link is appended onto the main link provided in the settings section to get the full documentation link about the node
Check out the JavaScript module as an example