mirror of
https://github.com/esiur/esiur-dart.git
synced 2026-04-03 17:58:21 +00:00
Merge 599a9078b2 into 2199a24abe
This commit is contained in:
@@ -72,6 +72,10 @@ printUsage() {
|
|||||||
print("");
|
print("");
|
||||||
print("Available commands:");
|
print("Available commands:");
|
||||||
print("\tget-template\tGet a template from an IIP link.");
|
print("\tget-template\tGet a template from an IIP link.");
|
||||||
|
print("\t\tFlags:");
|
||||||
|
print("\t\t\t-x, --getx\tGenerate apropriate getx bindings for resources.");
|
||||||
|
print(
|
||||||
|
"\t\t\t--namedargs\tUse named arguments instead of positional arguments for resource methods");
|
||||||
print("\tversion: print esiur version.");
|
print("\tversion: print esiur version.");
|
||||||
print("");
|
print("");
|
||||||
print("Global options:");
|
print("Global options:");
|
||||||
|
|||||||
@@ -377,10 +377,12 @@ class TemplateGenerator {
|
|||||||
});
|
});
|
||||||
|
|
||||||
template.properties.forEach((p) {
|
template.properties.forEach((p) {
|
||||||
var ptTypeName = getTypeName(template, p.valueType, templates, true);
|
final ptTypeName = getTypeName(template, p.valueType, templates, true);
|
||||||
rt.writeln("${ptTypeName} get ${p.name} { return get(${p.index}); }");
|
final suffix = p.valueType.type == DataType.String ? "?" : "";
|
||||||
rt.writeln(
|
rt.writeln(
|
||||||
"set ${p.name}(${ptTypeName} value) { set(${p.index}, value); }");
|
"$ptTypeName$suffix get ${p.name} { return get(${p.index}); }");
|
||||||
|
rt.writeln(
|
||||||
|
"set ${p.name}($ptTypeName$suffix value) { set(${p.index}, value); }");
|
||||||
});
|
});
|
||||||
|
|
||||||
template.events.forEach((e) {
|
template.events.forEach((e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user