Skip to content

Commit

Permalink
let future me do the job
Browse files Browse the repository at this point in the history
  • Loading branch information
sozysozbot committed Jul 26, 2020
1 parent aef1ebc commit 2a5326d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
## current status
Can compile all the samples in [明義第一](https://github.com/wenyan-lang/book/blob/master/01%20%E6%98%8E%E7%BE%A9%E7%AC%AC%E4%B8%80.md), [變數第二](https://github.com/wenyan-lang/book/blob/master/02%20%E8%AE%8A%E6%95%B8%E7%AC%AC%E4%BA%8C.md), [算術第三](https://github.com/wenyan-lang/book/blob/master/03%20%E7%AE%97%E8%A1%93%E7%AC%AC%E4%B8%89.md), [決策第四](https://github.com/wenyan-lang/book/blob/master/04%20%E6%B1%BA%E7%AD%96%E7%AC%AC%E5%9B%9B.md) and [循環第五](https://github.com/wenyan-lang/book/blob/master/05%20%E5%BE%AA%E7%92%B0%E7%AC%AC%E4%BA%94.md).

## known problems
* must change the `println!` into a custom function, in order to:
* print the numbers in Hanzi
* print the array (note that test081.rs currently does not compile as a valid Rust program)


## samples

### test006.wy
Expand Down Expand Up @@ -200,6 +206,3 @@ fn main() {
}
```

## todo
* `println!` the numbers in Hanzi

6 changes: 6 additions & 0 deletions src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,9 @@ fn test079() {
fn test080() {
test("test080")
}

/// note that test081.rs currently does not compile as a valid Rust program")
#[test]
fn test081() {
test("test081")
}
8 changes: 8 additions & 0 deletions test081.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fn main() {
let mut JIA3 = vec![];
JIA3.append(&mut vec![1.0, 2.0, 3.0]);
let mut YI3 = JIA3;
YI3[1 - 1] = 4.0;
let _ans1 = JIA3;
println!("{}", _ans1);
}
5 changes: 5 additions & 0 deletions test081.wy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
吾有一列。名之曰「甲」。充「甲」以一。以二。以三。
吾有一列。曰「甲」。名之曰「乙」。
昔之「乙」之一者。今四是矣。
夫「甲」。書之。

0 comments on commit 2a5326d

Please sign in to comment.