diff --git a/.flake8 b/.flake8 index 80d5c3e71..ce4ecbfbe 100644 --- a/.flake8 +++ b/.flake8 @@ -9,7 +9,7 @@ # what you do. We choose to break before operators. ignore = E721,W503 -exclude = jsparagus_build_venv,rust/target,jsparagus/parse_pgen_generated.py,js_parser/parser_tables.py +exclude = jsparagus_build_venv,crates/target,jsparagus/parse_pgen_generated.py,js_parser/parser_tables.py # todo: get this down to 99 max_line_length=109 diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 000000000..ced0b5d1d --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,456 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" + +[[package]] +name = "autocfg" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" + +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "blake2b_simd" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "bumpalo" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad807f2fc2bf185eeb98ff3a901bd46dc5ad58163d0fa4577ba0d25674d71708" + +[[package]] +name = "byteorder" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" + +[[package]] +name = "cc" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "crossbeam-utils" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" +dependencies = [ + "autocfg", + "cfg-if", + "lazy_static", +] + +[[package]] +name = "dirs" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" +dependencies = [ + "cfg-if", + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" +dependencies = [ + "cfg-if", + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "getrandom" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "itoa" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" + +[[package]] +name = "jsparagus" +version = "0.1.0" +dependencies = [ + "jsparagus-ast", + "jsparagus-driver", + "jsparagus-emitter", + "jsparagus-generated-parser", + "jsparagus-interpreter", + "jsparagus-parser", +] + +[[package]] +name = "jsparagus-ast" +version = "0.1.0" +dependencies = [ + "bumpalo", + "serde", + "serde_json", +] + +[[package]] +name = "jsparagus-driver" +version = "0.1.0" +dependencies = [ + "bumpalo", + "jsparagus-ast", + "jsparagus-emitter", + "jsparagus-interpreter", + "jsparagus-parser", + "rustyline", + "rustyline-derive", +] + +[[package]] +name = "jsparagus-emitter" +version = "0.1.0" +dependencies = [ + "bumpalo", + "byteorder", + "jsparagus-ast", + "jsparagus-parser", +] + +[[package]] +name = "jsparagus-generated-parser" +version = "0.1.0" +dependencies = [ + "bumpalo", + "jsparagus-ast", +] + +[[package]] +name = "jsparagus-interpreter" +version = "0.1.0" +dependencies = [ + "bumpalo", + "jsparagus-ast", + "jsparagus-emitter", + "jsparagus-parser", +] + +[[package]] +name = "jsparagus-parser" +version = "0.1.0" +dependencies = [ + "bumpalo", + "jsparagus-ast", + "jsparagus-generated-parser", + "unic-ucd-ident", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018" + +[[package]] +name = "log" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53445de381a1f436797497c61d851644d0e8e88e6140f22872ad33a704933978" + +[[package]] +name = "nix" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" +dependencies = [ + "bitflags", + "cc", + "cfg-if", + "libc", + "void", +] + +[[package]] +name = "proc-macro2" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.1.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" + +[[package]] +name = "redox_users" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" +dependencies = [ + "getrandom", + "redox_syscall", + "rust-argon2", +] + +[[package]] +name = "rust-argon2" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" +dependencies = [ + "base64", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils", +] + +[[package]] +name = "rustyline" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de64be8eecbe428b6924f1d8430369a01719fbb182c26fa431ddbb0a95f5315d" +dependencies = [ + "cfg-if", + "dirs", + "libc", + "log", + "memchr", + "nix", + "unicode-segmentation", + "unicode-width", + "utf8parse", + "winapi", +] + +[[package]] +name = "rustyline-derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69377056936308234fbb8f8789cada21b40b7796808a62783cdbe5c1315a0212" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "ryu" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" + +[[package]] +name = "serde" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "syn" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + +[[package]] +name = "unicode-segmentation" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" + +[[package]] +name = "unicode-width" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" + +[[package]] +name = "unicode-xid" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" + +[[package]] +name = "utf8parse" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8772a4ccbb4e89959023bc5b7cb8623a795caa7092d99f3aa9501b9484d4557d" + +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "winapi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 000000000..66221e190 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "jsparagus" +authors = ["The jsparagus Project Developers"] +version = "0.1.0" +description = "A JavaScript parser" +license = "MIT/Apache-2.0" +repository = "https://github.com/mozilla-spidermonkey/jsparagus" +publish = false +edition = "2018" + +[workspace] + +[lib] + +[dependencies] +jsparagus-ast = { path = "crates/ast" } +jsparagus-driver = { path = "crates/driver", optional = true } +jsparagus-emitter = { path = "crates/emitter" } +jsparagus-generated-parser = { path = "crates/generated_parser" } +jsparagus-parser = { path = "crates/parser" } +jsparagus-interpreter = { path = "crates/interpreter", optional = true } + +[features] +default = [] +full = ["jsparagus-driver", "jsparagus-interpreter"] + +[profile.release] +debug = true # enable debug symbols in release builds diff --git a/Makefile b/Makefile index a1d95e5b4..da9caeee3 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,12 @@ PY_OUT = js_parser/parser_tables.py -HANDLER_FILE = rust/generated_parser/src/ast_builder.rs +HANDLER_FILE = crates/generated_parser/src/ast_builder.rs HANDLER_INFO_OUT = jsparagus/emit/collect_handler_info/info.json -RS_TABLES_OUT = rust/generated_parser/src/parser_tables_generated.rs -RS_AST_OUT = rust/ast/src/types_generated.rs \ - rust/ast/src/type_id_generated.rs \ - rust/ast/src/visit_generated.rs \ - rust/ast/src/source_location_accessor_generated.rs \ - rust/generated_parser/src/stack_value_generated.rs +RS_TABLES_OUT = crates/generated_parser/src/parser_tables_generated.rs +RS_AST_OUT = crates/ast/src/types_generated.rs \ + crates/ast/src/type_id_generated.rs \ + crates/ast/src/visit_generated.rs \ + crates/ast/src/source_location_accessor_generated.rs \ + crates/generated_parser/src/stack_value_generated.rs JSPARAGUS_DIR := $(dir $(firstword $(MAKEFILE_LIST))) VENV_BIN_DIR := $(JSPARAGUS_DIR)jsparagus_build_venv/bin @@ -52,8 +52,8 @@ $(PY_OUT): $(EMIT_FILES) $(DUMP_FILE) $(HANDLER_INFO_OUT): jsparagus/emit/collect_handler_info/src/main.rs $(HANDLER_FILE) (cd jsparagus/emit/collect_handler_info/; cargo run --bin collect_handler_info ../../../$(HANDLER_FILE) $(subst jsparagus/emit/collect_handler_info/,,$(HANDLER_INFO_OUT))) -$(RS_AST_OUT): rust/ast/ast.json rust/ast/generate_ast.py - (cd rust/ast && $(abspath $(PYTHON)) generate_ast.py) +$(RS_AST_OUT): crates/ast/ast.json crates/ast/generate_ast.py + (cd crates/ast && $(abspath $(PYTHON)) generate_ast.py) $(RS_TABLES_OUT): $(EMIT_FILES) $(DUMP_FILE) $(HANDLER_INFO_OUT) $(PYTHON) -m js_parser.generate_js_parser_tables --progress -o $@ $(DUMP_FILE) $(HANDLER_INFO_OUT) @@ -64,11 +64,11 @@ $(STANDARD_ES_GRAMMAR_OUT): $(ECMA262_SPEC_HTML) $(PYTHON) -m js_parser.extract_es_grammar $(ECMA262_SPEC_HTML) > $@ || rm $@ rust: $(RS_AST_OUT) $(RS_TABLES_OUT) - cd rust && cargo build + cargo build check: all ./test.sh - cd rust && cargo fmt && cargo test + cargo fmt && cargo test jsdemo: $(PY_OUT) $(PYTHON) -m js_parser.try_it diff --git a/README.md b/README.md index 2d6464ed7..d340da07f 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ When it's done, you can: * Run `make check` to make sure things are working. -* `cd rust && cargo run` to test the JS parser and bytecode emitter. +* `cd crates/driver && cargo run` to test the JS parser and bytecode emitter. ## Limitations diff --git a/rust/ast/Cargo.toml b/crates/ast/Cargo.toml similarity index 100% rename from rust/ast/Cargo.toml rename to crates/ast/Cargo.toml diff --git a/rust/ast/ast.json b/crates/ast/ast.json similarity index 100% rename from rust/ast/ast.json rename to crates/ast/ast.json diff --git a/rust/ast/generate_ast.py b/crates/ast/generate_ast.py similarity index 99% rename from rust/ast/generate_ast.py rename to crates/ast/generate_ast.py index 7a90b78e7..1eb861c5a 100755 --- a/rust/ast/generate_ast.py +++ b/crates/ast/generate_ast.py @@ -177,7 +177,7 @@ def stack_value(ast): with open("../generated_parser/src/stack_value_generated.rs", "w+") as f: def write(*args): write_impl(f, *args) - write(0, "// WARNING: This file is auto-generated by rust/ast/generate_ast.py.") + write(0, "// WARNING: This file is auto-generated by crates/ast/generate_ast.py.") write(0, "") write(0, "use crate::token::Token;") write(0, "use ast::arena;") @@ -245,7 +245,7 @@ def loc_trait(ast): with open("src/source_location_accessor_generated.rs", "w+") as f: def write(*args): write_impl(f, *args) - write(0, "// WARNING: This file is auto-generated by rust/ast/generate_ast.py.") + write(0, "// WARNING: This file is auto-generated by crates/ast/generate_ast.py.") write(0, "") write(0, "use crate::SourceLocation;") write(0, "use crate::arena;") diff --git a/rust/ast/src/arena.rs b/crates/ast/src/arena.rs similarity index 100% rename from rust/ast/src/arena.rs rename to crates/ast/src/arena.rs diff --git a/rust/ast/src/associated_data.rs b/crates/ast/src/associated_data.rs similarity index 100% rename from rust/ast/src/associated_data.rs rename to crates/ast/src/associated_data.rs diff --git a/rust/ast/src/json.rs b/crates/ast/src/json.rs similarity index 100% rename from rust/ast/src/json.rs rename to crates/ast/src/json.rs diff --git a/rust/ast/src/lib.rs b/crates/ast/src/lib.rs similarity index 100% rename from rust/ast/src/lib.rs rename to crates/ast/src/lib.rs diff --git a/rust/ast/src/source_location.rs b/crates/ast/src/source_location.rs similarity index 100% rename from rust/ast/src/source_location.rs rename to crates/ast/src/source_location.rs diff --git a/rust/driver/Cargo.toml b/crates/driver/Cargo.toml similarity index 100% rename from rust/driver/Cargo.toml rename to crates/driver/Cargo.toml diff --git a/rust/driver/src/demo.rs b/crates/driver/src/demo.rs similarity index 100% rename from rust/driver/src/demo.rs rename to crates/driver/src/demo.rs diff --git a/rust/driver/src/main.rs b/crates/driver/src/main.rs similarity index 100% rename from rust/driver/src/main.rs rename to crates/driver/src/main.rs diff --git a/rust/emitter/Cargo.toml b/crates/emitter/Cargo.toml similarity index 100% rename from rust/emitter/Cargo.toml rename to crates/emitter/Cargo.toml diff --git a/rust/emitter/scripts/show_opcodes.py b/crates/emitter/scripts/show_opcodes.py similarity index 100% rename from rust/emitter/scripts/show_opcodes.py rename to crates/emitter/scripts/show_opcodes.py diff --git a/rust/emitter/src/ast_emitter.rs b/crates/emitter/src/ast_emitter.rs similarity index 100% rename from rust/emitter/src/ast_emitter.rs rename to crates/emitter/src/ast_emitter.rs diff --git a/rust/emitter/src/dis.rs b/crates/emitter/src/dis.rs similarity index 100% rename from rust/emitter/src/dis.rs rename to crates/emitter/src/dis.rs diff --git a/rust/emitter/src/emitter.rs b/crates/emitter/src/emitter.rs similarity index 100% rename from rust/emitter/src/emitter.rs rename to crates/emitter/src/emitter.rs diff --git a/rust/emitter/src/lib.rs b/crates/emitter/src/lib.rs similarity index 100% rename from rust/emitter/src/lib.rs rename to crates/emitter/src/lib.rs diff --git a/rust/emitter/src/lower/mod.rs b/crates/emitter/src/lower/mod.rs similarity index 100% rename from rust/emitter/src/lower/mod.rs rename to crates/emitter/src/lower/mod.rs diff --git a/rust/emitter/src/lower/scope.rs b/crates/emitter/src/lower/scope.rs similarity index 100% rename from rust/emitter/src/lower/scope.rs rename to crates/emitter/src/lower/scope.rs diff --git a/rust/emitter/src/opcode.rs b/crates/emitter/src/opcode.rs similarity index 100% rename from rust/emitter/src/opcode.rs rename to crates/emitter/src/opcode.rs diff --git a/rust/generated_parser/Cargo.toml b/crates/generated_parser/Cargo.toml similarity index 100% rename from rust/generated_parser/Cargo.toml rename to crates/generated_parser/Cargo.toml diff --git a/rust/generated_parser/src/ast_builder.rs b/crates/generated_parser/src/ast_builder.rs similarity index 100% rename from rust/generated_parser/src/ast_builder.rs rename to crates/generated_parser/src/ast_builder.rs diff --git a/rust/generated_parser/src/declaration_kind.rs b/crates/generated_parser/src/declaration_kind.rs similarity index 100% rename from rust/generated_parser/src/declaration_kind.rs rename to crates/generated_parser/src/declaration_kind.rs diff --git a/rust/generated_parser/src/early_errors.rs b/crates/generated_parser/src/early_errors.rs similarity index 100% rename from rust/generated_parser/src/early_errors.rs rename to crates/generated_parser/src/early_errors.rs diff --git a/rust/generated_parser/src/error.rs b/crates/generated_parser/src/error.rs similarity index 100% rename from rust/generated_parser/src/error.rs rename to crates/generated_parser/src/error.rs diff --git a/rust/generated_parser/src/lib.rs b/crates/generated_parser/src/lib.rs similarity index 100% rename from rust/generated_parser/src/lib.rs rename to crates/generated_parser/src/lib.rs diff --git a/rust/generated_parser/src/token.rs b/crates/generated_parser/src/token.rs similarity index 100% rename from rust/generated_parser/src/token.rs rename to crates/generated_parser/src/token.rs diff --git a/rust/interpreter/Cargo.toml b/crates/interpreter/Cargo.toml similarity index 100% rename from rust/interpreter/Cargo.toml rename to crates/interpreter/Cargo.toml diff --git a/rust/interpreter/src/evaluate.rs b/crates/interpreter/src/evaluate.rs similarity index 100% rename from rust/interpreter/src/evaluate.rs rename to crates/interpreter/src/evaluate.rs diff --git a/rust/interpreter/src/globals.rs b/crates/interpreter/src/globals.rs similarity index 100% rename from rust/interpreter/src/globals.rs rename to crates/interpreter/src/globals.rs diff --git a/rust/interpreter/src/lib.rs b/crates/interpreter/src/lib.rs similarity index 100% rename from rust/interpreter/src/lib.rs rename to crates/interpreter/src/lib.rs diff --git a/rust/interpreter/src/object.rs b/crates/interpreter/src/object.rs similarity index 100% rename from rust/interpreter/src/object.rs rename to crates/interpreter/src/object.rs diff --git a/rust/interpreter/src/tests.rs b/crates/interpreter/src/tests.rs similarity index 100% rename from rust/interpreter/src/tests.rs rename to crates/interpreter/src/tests.rs diff --git a/rust/interpreter/src/value.rs b/crates/interpreter/src/value.rs similarity index 100% rename from rust/interpreter/src/value.rs rename to crates/interpreter/src/value.rs diff --git a/rust/parser/Cargo.toml b/crates/parser/Cargo.toml similarity index 100% rename from rust/parser/Cargo.toml rename to crates/parser/Cargo.toml diff --git a/rust/parser/src/lexer.rs b/crates/parser/src/lexer.rs similarity index 100% rename from rust/parser/src/lexer.rs rename to crates/parser/src/lexer.rs diff --git a/rust/parser/src/lib.rs b/crates/parser/src/lib.rs similarity index 100% rename from rust/parser/src/lib.rs rename to crates/parser/src/lib.rs diff --git a/rust/parser/src/parser.rs b/crates/parser/src/parser.rs similarity index 100% rename from rust/parser/src/parser.rs rename to crates/parser/src/parser.rs diff --git a/rust/parser/src/simulator.rs b/crates/parser/src/simulator.rs similarity index 100% rename from rust/parser/src/simulator.rs rename to crates/parser/src/simulator.rs diff --git a/rust/parser/src/tests.rs b/crates/parser/src/tests.rs similarity index 100% rename from rust/parser/src/tests.rs rename to crates/parser/src/tests.rs diff --git a/js_parser/README.md b/js_parser/README.md index e0899b37f..3696b8c4c 100644 --- a/js_parser/README.md +++ b/js_parser/README.md @@ -33,7 +33,7 @@ laptop. jsparagus is slow. Once you're done, to see your parser run, try this: ```console -$ cd rust +$ cd crates/driver $ cargo run --release ``` diff --git a/jsparagus/README.md b/jsparagus/README.md index bf3f8813d..24bb5632c 100644 --- a/jsparagus/README.md +++ b/jsparagus/README.md @@ -4,7 +4,7 @@ This directory contains an LALR parser generator called "jsparagus", written in Python. This is used to build parts of the jsparagus JS parser in -[rust/generated_parser](https://github.com/mozilla-spidermonkey/jsparagus/blob/master/rust/generated_parser/). +[crates/generated_parser](https://github.com/mozilla-spidermonkey/jsparagus/blob/master/crates/generated_parser/). jsparagus generates parsers only; it's "bring your own lexer". @@ -58,7 +58,7 @@ Parser generators are complicated. Here's how this works. [runtime.py](https://github.com/jorendorff/jsparagus/blob/master/jsparagus/runtime.py). For Rust, it's in - [rust/parser/src/parser.rs](https://github.com/jorendorff/jsparagus/blob/master/rust/parser/src/parser.rs). + [crates/parser/src/parser.rs](https://github.com/jorendorff/jsparagus/blob/master/crates/parser/src/parser.rs). Because this code is currently tightly coupled to the JS lexer, jsparagus is not a fully general Rust parser generator yet. The Python code is more flexible. diff --git a/rust/Cargo.lock b/rust/Cargo.lock deleted file mode 100644 index 93b3d9404..000000000 --- a/rust/Cargo.lock +++ /dev/null @@ -1,446 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "arrayvec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "blake2b_simd" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bumpalo" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "byteorder" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cc" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "crossbeam-utils" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "dirs" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "dirs-sys" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "getrandom" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "itoa" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "jsparagus-ast" -version = "0.1.0" -dependencies = [ - "bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "jsparagus-driver" -version = "0.1.0" -dependencies = [ - "bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsparagus-ast 0.1.0", - "jsparagus-emitter 0.1.0", - "jsparagus-interpreter 0.1.0", - "jsparagus-parser 0.1.0", - "rustyline 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustyline-derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "jsparagus-emitter" -version = "0.1.0" -dependencies = [ - "bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jsparagus-ast 0.1.0", - "jsparagus-parser 0.1.0", -] - -[[package]] -name = "jsparagus-generated-parser" -version = "0.1.0" -dependencies = [ - "bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsparagus-ast 0.1.0", -] - -[[package]] -name = "jsparagus-interpreter" -version = "0.1.0" -dependencies = [ - "bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsparagus-ast 0.1.0", - "jsparagus-emitter 0.1.0", - "jsparagus-parser 0.1.0", -] - -[[package]] -name = "jsparagus-parser" -version = "0.1.0" -dependencies = [ - "bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsparagus-ast 0.1.0", - "jsparagus-generated-parser 0.1.0", - "unic-ucd-ident 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.66" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "memchr" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "nix" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro2" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.56" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "redox_users" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rust-argon2" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rustyline" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8parse 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rustyline-derive" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ryu" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde" -version = "1.0.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive" -version = "1.0.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_json" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unic-char-property" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unic-char-range 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unic-char-range" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unic-common" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unic-ucd-ident" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unic-char-property 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unic-char-range 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unic-ucd-version 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unic-ucd-version" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unic-common 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-segmentation" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-width" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-xid" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "utf8parse" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" -"checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" -"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" -"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" -"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -"checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" -"checksum bumpalo 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad807f2fc2bf185eeb98ff3a901bd46dc5ad58163d0fa4577ba0d25674d71708" -"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" -"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" -"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -"checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" -"checksum dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" -"checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" -"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" -"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -"checksum memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" -"checksum nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" -"checksum proc-macro2 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e98a83a9f9b331f54b924e68a66acb1bb35cb01fb0a23645139967abefb697e8" -"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" -"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" -"checksum rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" -"checksum rustyline 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de64be8eecbe428b6924f1d8430369a01719fbb182c26fa431ddbb0a95f5315d" -"checksum rustyline-derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "69377056936308234fbb8f8789cada21b40b7796808a62783cdbe5c1315a0212" -"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" -"checksum serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "9796c9b7ba2ffe7a9ce53c2287dfc48080f4b2b362fcc245a259b3a7201119dd" -"checksum serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e" -"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" -"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" -"checksum unic-char-property 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" -"checksum unic-char-range 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" -"checksum unic-common 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" -"checksum unic-ucd-ident 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" -"checksum unic-ucd-version 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" -"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" -"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum utf8parse 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8772a4ccbb4e89959023bc5b7cb8623a795caa7092d99f3aa9501b9484d4557d" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/rust/Cargo.toml b/rust/Cargo.toml deleted file mode 100644 index b5a9c4f15..000000000 --- a/rust/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[workspace] - -members = [ - "ast", - "driver", - "emitter", - "generated_parser", - "parser", - "interpreter", -] - -[profile.release] -debug = true # enable debug symbols in release builds diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 000000000..87d3395ab --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,14 @@ +pub mod ast { + extern crate jsparagus_ast; + pub use self::jsparagus_ast::*; +} + +pub mod emitter { + extern crate jsparagus_emitter; + pub use self::jsparagus_emitter::*; +} + +pub mod parser { + extern crate jsparagus_parser; + pub use self::jsparagus_parser::*; +}