Skip to content

Commit c6171dc

Browse files
author
magiclu550
committed
添加参数help
1 parent 37f8a1e commit c6171dc

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed
+6-17
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,17 @@
11
package cn.wenyan.compiler;
22

33

4+
import cn.wenyan.compiler.command.CommandHandler;
5+
6+
47

58
public class Main {
69

710
public static void main(String[] args) throws Exception{
11+
if (args.length == 0){
12+
CommandHandler.compileCommand.entrySet().stream().forEach(x->System.out.println(x.getValue().getOption()+": "+x.getValue().getClass().getSimpleName()));
13+
}
814
WenYanCompiler compiler = new WenYanCompilerImpl(false);
915
compiler.compile(args);
10-
// compiler.runDirectly(false,"" +
11-
// "吾有一數。曰四十二。名之曰「運數」。" +
12-
// "今有一術。名之曰「運」。欲行是術。必先得一數。曰「甲」。乃行是術曰。" +
13-
// " 注曰「「運者。隨機種子也」」。" +
14-
// " 昔之「運數」者。今「甲」是矣。" +
15-
// " 是謂「運」之術也。" +
16-
// "今有一術。名之曰「占」。是術曰。" +
17-
// " 注曰「「線性同餘方法所得隨機數也」」。" +
18-
// " 有數四十二億九千四百九十六萬七千二百九十六。名之曰「模」。" +
19-
// " 注曰「「有數二千二百六十九萬五千四百七十七。名之曰「倍」。」」。" +
20-
// " 有數二千二百六十七萬五千四百五十六。名之曰「上倍」。有數二萬零二十一。" +
21-
// " 名之曰「下倍」。有數一。名之曰「增」。" +
22-
// " 乘「上倍」於「運數」。除其以「模」。所餘幾何。名之曰「上餘」。" +
23-
// " 乘「下倍」於「運數」。加其於「上餘」。加其以「增」。" +
24-
// " 除其以「模」。所餘幾何。昔之「運數」者。今其是矣。" +
25-
// " 除「運數」以「模」。名之曰「卦」。乃得「卦」。" +
26-
// "是謂「占」之術也。");
2716
}
2817
}

0 commit comments

Comments
 (0)