|
1 |
| -use mango::towasm::Wasm; |
2 |
| -use std::fs::File; |
3 |
| -use std::io; |
4 |
| -use std::rc::Rc; |
5 |
| - |
6 |
| -pub enum AnonymousName { |
7 |
| - Pending(AnonymousToken), |
8 |
| - Resolved(AnonymousChoice), |
9 |
| -} |
10 |
| - |
11 |
| -pub struct AnonymousToken { |
12 |
| - |
13 |
| -} |
14 |
| - |
15 |
| -pub struct AnonymousChoice { |
16 |
| - |
17 |
| -} |
18 |
| - |
19 |
| -pub struct AnonymousTokenPool { |
20 |
| - name_tokens: Vec<> |
21 |
| -} |
22 |
| - |
23 |
| -impl Name { |
24 |
| - pub fn new(name: String) -> Option<Rc<Self>> { |
25 |
| - // todo: filter out illegal names |
26 |
| - assert!(!name.starts_with("$")); |
27 |
| - return Some(Rc::new(Name { name })); |
28 |
| - } |
29 |
| - |
30 |
| - pub fn pure_name(&self) -> String { |
31 |
| - return self.name.to_owned(); |
32 |
| - } |
33 |
| -} |
34 |
| - |
35 |
| -impl Wasm for Name { |
36 |
| - fn as_wat(&self) -> String { |
37 |
| - format!("${}", self.name) |
38 |
| - } |
39 |
| - |
40 |
| - fn write_wasm(&self, file: &mut File) -> io::Result<()> { |
41 |
| - unimplemented!() |
42 |
| - } |
43 |
| -} |
| 1 | +//use mango::towasm::Wasm; |
| 2 | +//use std::fs::File; |
| 3 | +//use std::io; |
| 4 | +//use std::rc::Rc; |
| 5 | +// |
| 6 | +//pub enum AnonymousName { |
| 7 | +// Pending(AnonymousToken), |
| 8 | +// Resolved(AnonymousChoice), |
| 9 | +//} |
| 10 | +// |
| 11 | +//pub struct AnonymousToken { |
| 12 | +// |
| 13 | +//} |
| 14 | +// |
| 15 | +//pub struct AnonymousChoice { |
| 16 | +// |
| 17 | +//} |
| 18 | +// |
| 19 | +//pub struct AnonymousTokenPool { |
| 20 | +// name_tokens: Vec<> |
| 21 | +//} |
| 22 | +// |
| 23 | +//impl Name { |
| 24 | +// pub fn new(name: String) -> Option<Rc<Self>> { |
| 25 | +// // todo: filter out illegal names |
| 26 | +// assert!(!name.starts_with("$")); |
| 27 | +// return Some(Rc::new(Name { name })); |
| 28 | +// } |
| 29 | +// |
| 30 | +// pub fn pure_name(&self) -> String { |
| 31 | +// return self.name.to_owned(); |
| 32 | +// } |
| 33 | +//} |
| 34 | +// |
| 35 | +//impl Wasm for Name { |
| 36 | +// fn as_wat(&self) -> String { |
| 37 | +// format!("${}", self.name) |
| 38 | +// } |
| 39 | +// |
| 40 | +// fn write_wasm(&self, file: &mut File) -> io::Result<()> { |
| 41 | +// unimplemented!() |
| 42 | +// } |
| 43 | +//} |
0 commit comments