dpro 0.3.3
dpro: ^0.3.3 copied to clipboard
A tool to transform programing langrage. it can transform algorithm to Python and Java now. !! it is a lowcode develop engine.
DPro #
what is DPro? #
DPro is a auto programing langrage transfrom tool.
How to use it? #
// choose the programing langrage
TranEngine.tip = LanguageTips.java;
print(TranEngine.tran(
codes: cli.sampleFor(),
));
// prepare logic Objects
CodeLines sampleFor() {
return OCodeLines(objects: [
OForE(
type: DTypes.dStr,
list: OList(
valueType: DTypes.dStr,
values: [OString("a"), OString("b"), OString("c"), OString("d")]),
lines: OCodeLines(objects: [
OPrint(OVar("e")),
]))
]);
}
// output java code:
for (String e : new ArrayList<String>(Arrays.asList("a", "b", "c", "d"))) {
Log.d("log",e);
}
スポンサー #
how would we create the engine from zero #
- lines
- types
- def
- def give
- give
- const value
- const list
- const map
- list.get
- map.get
- var
- ouput(print)
- calculate
- if
- else
- fori
- fori_simply
- fore
- while
- func
- class
- extend
TODO:
- export to json and import with json
- let it can run code objects!
- modules!
- UI designer!
语言设定和规范设定的不同: 语言设定是指构成语言的核心部分,通常包含许多的构造字符, 规范设定是指某语言的规范, 通常包含缩进的空格数量,是否完全使用括号来包含算式, 使用哪种log输出方式等等.