Checkpoint state

This commit is contained in:
howardwu 2021-02-05 12:46:19 -08:00
parent 42117f08ce
commit d8fad17792
4 changed files with 14 additions and 16 deletions

2
Cargo.lock generated
View File

@ -1438,10 +1438,8 @@ dependencies = [
name = "leo-wasm" name = "leo-wasm"
version = "1.2.0" version = "1.2.0"
dependencies = [ dependencies = [
"leo-asg",
"leo-ast", "leo-ast",
"leo-grammar", "leo-grammar",
"leo-imports",
"serde", "serde",
"wasm-bindgen", "wasm-bindgen",
"wasm-bindgen-test", "wasm-bindgen-test",

View File

@ -8,7 +8,7 @@
"identifier": "{\"name\":\"main\",\"span\":\"{\\\"text\\\":\\\" function main() {\\\",\\\"line\\\":1,\\\"start\\\":10,\\\"end\\\":14}\"}", "identifier": "{\"name\":\"main\",\"span\":\"{\\\"text\\\":\\\" function main() {\\\",\\\"line\\\":1,\\\"start\\\":10,\\\"end\\\":14}\"}",
"input": [], "input": [],
"output": null, "output": null,
"block": { "block" : {
"statements": [ "statements": [
{ {
"Return": { "Return": {
@ -27,6 +27,7 @@
] ]
} }
}, },
"op": "Add",
"right": { "right": {
"Value": { "Value": {
"Implicit": [ "Implicit": [
@ -40,7 +41,6 @@
] ]
} }
}, },
"op": "Add",
"span": { "span": {
"text": " return 1 + 1", "text": " return 1 + 1",
"line": 2, "line": 2,
@ -49,7 +49,7 @@
} }
} }
}, },
"span": { "span" : {
"text": " return 1 + 1", "text": " return 1 + 1",
"line": 2, "line": 2,
"start": 5, "start": 5,
@ -58,18 +58,18 @@
} }
} }
], ],
"span": { "span" : {
"text": " function main() {", "text": " return 1 + 1",
"line": 1, "line": 2,
"start": 17, "start": 5,
"end": 2 "end": 17
} }
}, },
"span": { "span": {
"text": " function main() {", "text": " function main() {",
"line": 1, "line": 1,
"start": 1, "start": 1,
"end": 2 "end": 1
} }
} }
}, },

View File

@ -21,9 +21,9 @@ edition = "2018"
crate-type = ["cdylib", "rlib"] crate-type = ["cdylib", "rlib"]
[dependencies] [dependencies]
leo-asg = { path = "../asg", version = "1.2.0" } #leo-asg = { path = "../asg", version = "1.2.0" }
leo-ast = { path = "../ast", version = "1.2.0" } leo-ast = { path = "../ast", version = "1.2.0" }
leo-imports = { path = "../imports", version = "1.2.0" } #leo-imports = { path = "../imports", version = "1.2.0" }
leo-grammar = { path = "../grammar", version = "1.2.0" } leo-grammar = { path = "../grammar", version = "1.2.0" }
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }

View File

@ -13,9 +13,9 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>. // along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
//
pub mod asg; // pub mod asg;
pub use asg::*; // pub use asg::*;
pub mod ast; pub mod ast;
pub use ast::*; pub use ast::*;