aggregatedDataTypeDocumentation function
Implementation
String aggregatedDataTypeDocumentation(Grammar grammar, int titleLevel) {
var markDown = StringBuffer();
markDown.writeln(
'A [data type](https://en.wikipedia.org/wiki/Data_type) defines what the '
'possible values an expression, such as a variable, operator '
'or a function call, might use.\n\n'
'The [template_engine](https://pub.dev/packages/template_engine) '
'supports several default DataTypes.',
);
for (var dataType in grammar.dataTypes) {
markDown.writeln(
dataType.documentation.createMarkdownDocumentation(
grammar,
titleLevel + 1,
),
);
}
markDown.writeln(markdownTitle(titleLevel + 1, 'Custom data types'));
markDown.writeln(
'You can use the data types that are packaged with Template Engine, '
'but you can also add or replace these with '
'your own custom made data types. '
'This is done by creating your own TemplateEngineConfiguration or '
'adding to it using the withAdditionalDataTypes() method\n',
);
markDown.write('Example: ');
markDown.writeln(customDataTypeExample.toMarkdownLink());
return markDown.toString();
}