Skip to content

Commit 08dab86

Browse files
LingDong-Lingdong Huang
authored andcommitted
combine alias and link into info and fix english
1 parent 9149e4a commit 08dab86

File tree

5 files changed

+47
-46
lines changed

5 files changed

+47
-46
lines changed

tools/examples_alias.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

tools/examples_info.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module.exports = {
2+
examplesAlias: {
3+
beer: "九十九瓶啤酒",
4+
collatz: "考拉兹猜想",
5+
collatz2: "考拉兹猜想二",
6+
divination: "春秋古筮法",
7+
draw_heart: "畫心",
8+
eightqueens: "八皇后問題",
9+
euclidean: "歐幾里得法",
10+
factorial: "階乘",
11+
fibonacci: "斐氏列",
12+
fibonacci2: "斐氏列二",
13+
fizzbuzz: "嘶嘶嗡嗡",
14+
hanoi: "漢諾塔",
15+
helloworld: "問天地好在",
16+
"helloworld+": "問天地好在+",
17+
import: "導入示例",
18+
mandelbrot: "曼德博集",
19+
mergesort: "歸併排序",
20+
macro: "宏示例",
21+
misc: "雜項",
22+
modinv: "大衍求一術",
23+
multiplication_table: "乘算口訣",
24+
nested_fun: "嵌套調用示例",
25+
obj: "对象示例",
26+
pi_leibniz: "萊布尼茲圓周率估算",
27+
pi_liuhui: "劉徽割圓術求圓周率",
28+
quicksort: "快速排序",
29+
quicksort_inplace: "快速排序二",
30+
quine: "自產生程式",
31+
quine2: "自產生程式二",
32+
selectionsort: "選擇排序",
33+
sieve: "埃氏篩",
34+
sqrt_newton: "牛頓求根法",
35+
turing: "圖靈機",
36+
tree: "畫樹",
37+
tree2: "畫樹二",
38+
try: "異常處理示例"
39+
},
40+
examplesLinks: {
41+
fizzbuzz: "[1]: https://en.wikipedia.org/wiki/Fizz_buzz",
42+
quine: "[2]: https://zh.wikipedia.org/wiki/自產生程式"
43+
}
44+
};

tools/examples_links.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

tools/make_examples_readme.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const fs = require("fs");
2-
const examplesAlias = require("./examples_alias");
3-
const examplesLinks = require("./examples_links");
2+
const { examplesAlias, examplesLinks } = require("./examples_info");
43

54
const files = fs
65
.readdirSync(__dirname + "/../examples/")
@@ -10,7 +9,7 @@ files.sort((a, b) => a.slice(0, -3).localeCompare(b.slice(0, -3)));
109
const leftWidth = "--------------------------------------".length;
1110
const rightWidth = "-------------------------".length;
1211

13-
let content = `<!-- Auto generated. DO NOT edit this file humanly. -->
12+
let content = `<!-- Auto generated. DO NOT edit this file manually. -->
1413
# Examples(範例)
1514
1615
| File(文檔) | Remark(說明) |

tools/make_ide.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var fs = require("fs");
66
var execSync = require("child_process").execSync;
77
var parser = require("../src/parser");
88
var utils = require("./utils");
9-
const examplesAlias = require("./examples_alias");
9+
const { examplesAlias } = require("./examples_info");
1010

1111
var files = fs.readdirSync("../examples/").filter(x => x.endsWith(".wy"));
1212
var prgms = {};

0 commit comments

Comments
 (0)