From 47e120f66d50e119f22b16db7dabf251ff510523 Mon Sep 17 00:00:00 2001 From: freestrings Date: Thu, 14 Mar 2019 22:30:42 +0900 Subject: [PATCH] =?UTF-8?q?NodeJs=20native=20binding=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_trace__filter__array.xml | 14 - .../_trace__filter__example.xml | 14 - .../runConfigurations/_trace__filter__op.xml | 14 - .../_trace__filter__return_type.xml | 14 - .../_trace__filter__step_in.xml | 14 - .../_trace__parser__parse_array_float.xml | 14 - .../_trace__parser__parse_array_sytax.xml | 14 - .../_trace__parser__parse_path.xml | 14 - .idea/runConfigurations/all.xml | 6 +- .idea/runConfigurations/filter.xml | 12 + .idea/runConfigurations/filter_all.xml | 12 - .idea/runConfigurations/lib.xml | 12 + .idea/runConfigurations/parser.xml | 12 + .idea/runConfigurations/parser_all.xml | 12 - .idea/runConfigurations/tokenize_all.xml | 12 - .idea/runConfigurations/tokenizer.xml | 12 + .travis.yml | 82 +- Cargo.toml | 4 +- benches/bench.rs | 34 +- benches/bench_bin/.gitignore | 3 +- benches/bench_bin/.idea/bench_bin.iml | 15 + benches/bench_bin/.idea/encodings.xml | 4 + benches/bench_bin/.idea/misc.xml | 9 + benches/bench_bin/.idea/modules.xml | 8 + benches/bench_bin/.idea/vcs.xml | 6 + benches/bench_bin/.idea/workspace.xml | 152 + benches/bench_bin/bench.sh | 2 +- benches/bench_bin/src/main.rs | 33 +- benches/bench_node_vs_rust.sh | 45 +- benches/javascript/bench.js | 73 +- benches/javascript/bench.sh | 2 +- build.sh | 88 + docs/0.bootstrap.js | 6 +- docs/9a826648f4cbc2bc8591.module.wasm | Bin 311275 -> 0 bytes docs/bench/0.bootstrap.js | 8 +- docs/bench/9a826648f4cbc2bc8591.module.wasm | Bin 311275 -> 0 bytes docs/bench/bootstrap.js | 14 +- docs/bench/db8564aae9d99ec41b79.module.wasm | Bin 0 -> 315036 bytes docs/bootstrap.js | 14 +- docs/db8564aae9d99ec41b79.module.wasm | Bin 0 -> 315036 bytes nodejs/.gitignore | 6 + nodejs/README.md | 3 + nodejs/lib/index.js | 34 + nodejs/native/.gitignore | 5 + nodejs/native/Cargo.toml | 24 + nodejs/native/build.rs | 7 + nodejs/native/src/lib.rs | 126 + nodejs/package-lock.json | 3172 +++++++++++++++++ nodejs/package.json | 20 + nodejs/test/index.spec.js | 30 + src/filter/mod.rs | 352 +- src/filter/prelude.rs | 1 + src/filter/value_filter.rs | 16 +- src/filter/value_wrapper.rs | 1 + src/lib.rs | 104 +- src/parser/mod.rs | 3 +- src/parser/parser.rs | 390 +- src/parser/path_reader.rs | 8 +- src/parser/prelude.rs | 2 + src/parser/tokenizer.rs | 235 +- src/prelude.rs | 3 + src/ref_value/mod.rs | 32 +- tests/filter.rs | 345 ++ tests/lib.rs | 69 + tests/parser.rs | 313 ++ tests/tokenizer.rs | 194 + wasm/Cargo.toml | 3 - wasm/build.sh | 79 - wasm/src/lib.rs | 10 +- 69 files changed, 4967 insertions(+), 1424 deletions(-) delete mode 100644 .idea/runConfigurations/_trace__filter__array.xml delete mode 100644 .idea/runConfigurations/_trace__filter__example.xml delete mode 100644 .idea/runConfigurations/_trace__filter__op.xml delete mode 100644 .idea/runConfigurations/_trace__filter__return_type.xml delete mode 100644 .idea/runConfigurations/_trace__filter__step_in.xml delete mode 100644 .idea/runConfigurations/_trace__parser__parse_array_float.xml delete mode 100644 .idea/runConfigurations/_trace__parser__parse_array_sytax.xml delete mode 100644 .idea/runConfigurations/_trace__parser__parse_path.xml create mode 100644 .idea/runConfigurations/filter.xml delete mode 100644 .idea/runConfigurations/filter_all.xml create mode 100644 .idea/runConfigurations/lib.xml create mode 100644 .idea/runConfigurations/parser.xml delete mode 100644 .idea/runConfigurations/parser_all.xml delete mode 100644 .idea/runConfigurations/tokenize_all.xml create mode 100644 .idea/runConfigurations/tokenizer.xml create mode 100644 benches/bench_bin/.idea/bench_bin.iml create mode 100644 benches/bench_bin/.idea/encodings.xml create mode 100644 benches/bench_bin/.idea/misc.xml create mode 100644 benches/bench_bin/.idea/modules.xml create mode 100644 benches/bench_bin/.idea/vcs.xml create mode 100644 benches/bench_bin/.idea/workspace.xml create mode 100755 build.sh delete mode 100644 docs/9a826648f4cbc2bc8591.module.wasm delete mode 100644 docs/bench/9a826648f4cbc2bc8591.module.wasm create mode 100644 docs/bench/db8564aae9d99ec41b79.module.wasm create mode 100644 docs/db8564aae9d99ec41b79.module.wasm create mode 100644 nodejs/.gitignore create mode 100644 nodejs/README.md create mode 100644 nodejs/lib/index.js create mode 100644 nodejs/native/.gitignore create mode 100644 nodejs/native/Cargo.toml create mode 100644 nodejs/native/build.rs create mode 100644 nodejs/native/src/lib.rs create mode 100644 nodejs/package-lock.json create mode 100644 nodejs/package.json create mode 100644 nodejs/test/index.spec.js create mode 100644 src/filter/prelude.rs create mode 100644 src/parser/prelude.rs create mode 100644 src/prelude.rs create mode 100644 tests/filter.rs create mode 100644 tests/lib.rs create mode 100644 tests/parser.rs create mode 100644 tests/tokenizer.rs delete mode 100755 wasm/build.sh diff --git a/.idea/runConfigurations/_trace__filter__array.xml b/.idea/runConfigurations/_trace__filter__array.xml deleted file mode 100644 index ba1e808..0000000 --- a/.idea/runConfigurations/_trace__filter__array.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/_trace__filter__example.xml b/.idea/runConfigurations/_trace__filter__example.xml deleted file mode 100644 index c6f1d22..0000000 --- a/.idea/runConfigurations/_trace__filter__example.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/_trace__filter__op.xml b/.idea/runConfigurations/_trace__filter__op.xml deleted file mode 100644 index 52842d0..0000000 --- a/.idea/runConfigurations/_trace__filter__op.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/_trace__filter__return_type.xml b/.idea/runConfigurations/_trace__filter__return_type.xml deleted file mode 100644 index 7f2a0cc..0000000 --- a/.idea/runConfigurations/_trace__filter__return_type.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/_trace__filter__step_in.xml b/.idea/runConfigurations/_trace__filter__step_in.xml deleted file mode 100644 index e3bc808..0000000 --- a/.idea/runConfigurations/_trace__filter__step_in.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/_trace__parser__parse_array_float.xml b/.idea/runConfigurations/_trace__parser__parse_array_float.xml deleted file mode 100644 index f912aaa..0000000 --- a/.idea/runConfigurations/_trace__parser__parse_array_float.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/_trace__parser__parse_array_sytax.xml b/.idea/runConfigurations/_trace__parser__parse_array_sytax.xml deleted file mode 100644 index 14e87ff..0000000 --- a/.idea/runConfigurations/_trace__parser__parse_array_sytax.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/_trace__parser__parse_path.xml b/.idea/runConfigurations/_trace__parser__parse_path.xml deleted file mode 100644 index c43f72a..0000000 --- a/.idea/runConfigurations/_trace__parser__parse_path.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/all.xml b/.idea/runConfigurations/all.xml index cae146e..cb9472d 100644 --- a/.idea/runConfigurations/all.xml +++ b/.idea/runConfigurations/all.xml @@ -1,10 +1,10 @@