diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/kabel.iml b/.idea/kabel.iml new file mode 100644 index 0000000..eaf88de --- /dev/null +++ b/.idea/kabel.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..f625fe9 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..fd5c6d0 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,95 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "kabel" +version = "0.1.0" +dependencies = [ + "libkabel", +] + +[[package]] +name = "libkabel" +version = "0.1.0" +dependencies = [ + "tracing", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "proc-macro2" +version = "1.0.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "syn" +version = "2.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..e92d6e1 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[workspace] +members = [ + "kabel", + "libkabel" +] +resolver = "2" \ No newline at end of file diff --git a/kabel-rs/src/test.kab b/examples/test.kab similarity index 52% rename from kabel-rs/src/test.kab rename to examples/test.kab index c88670a..a44821d 100644 --- a/kabel-rs/src/test.kab +++ b/examples/test.kab @@ -1,3 +1,3 @@ #!/usr/bin/env kabel declare p = 5; -debug: print using (3 + p) * 2; +debug: print using (3 + 5) * 2; diff --git a/kabel-rs/src/try.kab b/examples/try.kab similarity index 100% rename from kabel-rs/src/try.kab rename to examples/try.kab diff --git a/kabel-rs/Cargo.lock b/kabel-rs/Cargo.lock deleted file mode 100644 index 29361f8..0000000 --- a/kabel-rs/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "kabel-rs" -version = "0.1.0" diff --git a/kabel-rs/src/errors.rs b/kabel-rs/src/errors.rs deleted file mode 100644 index 8b13789..0000000 --- a/kabel-rs/src/errors.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/kabel-rs/target/.rustc_info.json b/kabel-rs/target/.rustc_info.json deleted file mode 100644 index 49d1dec..0000000 --- a/kabel-rs/target/.rustc_info.json +++ /dev/null @@ -1 +0,0 @@ -{"rustc_fingerprint":7338601337485693249,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.74.0 (79e9716c9 2023-11-13)\nbinary: rustc\ncommit-hash: 79e9716c980570bfd1f666e3b16ac583f0168962\ncommit-date: 2023-11-13\nhost: x86_64-unknown-linux-gnu\nrelease: 1.74.0\nLLVM version: 17.0.4\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/tm85/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}} \ No newline at end of file diff --git a/kabel-rs/target/CACHEDIR.TAG b/kabel-rs/target/CACHEDIR.TAG deleted file mode 100644 index 20d7c31..0000000 --- a/kabel-rs/target/CACHEDIR.TAG +++ /dev/null @@ -1,3 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by cargo. -# For information about cache directory tags see https://bford.info/cachedir/ diff --git a/kabel-rs/target/debug/.cargo-lock b/kabel-rs/target/debug/.cargo-lock deleted file mode 100644 index e69de29..0000000 diff --git a/kabel-rs/target/debug/.fingerprint/kabel-rs-b7a5db911f8343d3/invoked.timestamp b/kabel-rs/target/debug/.fingerprint/kabel-rs-b7a5db911f8343d3/invoked.timestamp deleted file mode 100644 index e00328d..0000000 --- a/kabel-rs/target/debug/.fingerprint/kabel-rs-b7a5db911f8343d3/invoked.timestamp +++ /dev/null @@ -1 +0,0 @@ -This file has an mtime of when this was started. \ No newline at end of file diff --git a/kabel-rs/target/debug/.fingerprint/kabel-rs-b7a5db911f8343d3/output-bin-kabel-rs b/kabel-rs/target/debug/.fingerprint/kabel-rs-b7a5db911f8343d3/output-bin-kabel-rs deleted file mode 100644 index 9116306..0000000 --- a/kabel-rs/target/debug/.fingerprint/kabel-rs-b7a5db911f8343d3/output-bin-kabel-rs +++ /dev/null @@ -1,21 +0,0 @@ -{"message":"expected one of `(`, `,`, `=`, `{`, or `}`, found `Subtract`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":58,"byte_end":58,"line_start":4,"line_end":4,"column_start":8,"column_end":8,"is_primary":false,"text":[{"text":" Add","highlight_start":8,"highlight_end":8}],"label":"expected one of `(`, `,`, `=`, `{`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":63,"byte_end":71,"line_start":5,"line_end":5,"column_start":5,"column_end":13,"is_primary":true,"text":[{"text":" Subtract","highlight_start":5,"highlight_end":13}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":58,"byte_end":58,"line_start":4,"line_end":4,"column_start":8,"column_end":8,"is_primary":true,"text":[{"text":" Add","highlight_start":8,"highlight_end":8}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `(`, `,`, `=`, `{`, or `}`, found `Subtract`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:5:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m4\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Add\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `(`, `,`, `=`, `{`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m5\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Subtract\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `(`, `,`, `=`, `{`, or `}`, found `Multiply`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":71,"byte_end":71,"line_start":5,"line_end":5,"column_start":13,"column_end":13,"is_primary":false,"text":[{"text":" Subtract","highlight_start":13,"highlight_end":13}],"label":"expected one of `(`, `,`, `=`, `{`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":76,"byte_end":84,"line_start":6,"line_end":6,"column_start":5,"column_end":13,"is_primary":true,"text":[{"text":" Multiply","highlight_start":5,"highlight_end":13}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":71,"byte_end":71,"line_start":5,"line_end":5,"column_start":13,"column_end":13,"is_primary":true,"text":[{"text":" Subtract","highlight_start":13,"highlight_end":13}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `(`, `,`, `=`, `{`, or `}`, found `Multiply`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:6:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m5\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Subtract\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `(`, `,`, `=`, `{`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m6\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Multiply\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `(`, `,`, `=`, `{`, or `}`, found `Divide`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":84,"byte_end":84,"line_start":6,"line_end":6,"column_start":13,"column_end":13,"is_primary":false,"text":[{"text":" Multiply","highlight_start":13,"highlight_end":13}],"label":"expected one of `(`, `,`, `=`, `{`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":89,"byte_end":95,"line_start":7,"line_end":7,"column_start":5,"column_end":11,"is_primary":true,"text":[{"text":" Divide","highlight_start":5,"highlight_end":11}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":84,"byte_end":84,"line_start":6,"line_end":6,"column_start":13,"column_end":13,"is_primary":true,"text":[{"text":" Multiply","highlight_start":13,"highlight_end":13}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `(`, `,`, `=`, `{`, or `}`, found `Divide`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:7:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m6\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Multiply\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `(`, `,`, `=`, `{`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Divide\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `(`, `,`, `=`, `{`, or `}`, found `Exponentiate`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":95,"byte_end":95,"line_start":7,"line_end":7,"column_start":11,"column_end":11,"is_primary":false,"text":[{"text":" Divide","highlight_start":11,"highlight_end":11}],"label":"expected one of `(`, `,`, `=`, `{`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":100,"byte_end":112,"line_start":8,"line_end":8,"column_start":5,"column_end":17,"is_primary":true,"text":[{"text":" Exponentiate","highlight_start":5,"highlight_end":17}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":95,"byte_end":95,"line_start":7,"line_end":7,"column_start":11,"column_end":11,"is_primary":true,"text":[{"text":" Divide","highlight_start":11,"highlight_end":11}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `(`, `,`, `=`, `{`, or `}`, found `Exponentiate`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:8:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Divide\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `(`, `,`, `=`, `{`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m8\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Exponentiate\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `(`, `,`, `=`, `{`, or `}`, found `Modulus`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":112,"byte_end":112,"line_start":8,"line_end":8,"column_start":17,"column_end":17,"is_primary":false,"text":[{"text":" Exponentiate","highlight_start":17,"highlight_end":17}],"label":"expected one of `(`, `,`, `=`, `{`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":117,"byte_end":124,"line_start":9,"line_end":9,"column_start":5,"column_end":12,"is_primary":true,"text":[{"text":" Modulus","highlight_start":5,"highlight_end":12}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":112,"byte_end":112,"line_start":8,"line_end":8,"column_start":17,"column_end":17,"is_primary":true,"text":[{"text":" Exponentiate","highlight_start":17,"highlight_end":17}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `(`, `,`, `=`, `{`, or `}`, found `Modulus`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:9:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m8\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Exponentiate\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `(`, `,`, `=`, `{`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m9\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Modulus\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `(`, `,`, `=`, `{`, or `}`, found `Or`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":163,"byte_end":163,"line_start":13,"line_end":13,"column_start":8,"column_end":8,"is_primary":false,"text":[{"text":" And","highlight_start":8,"highlight_end":8}],"label":"expected one of `(`, `,`, `=`, `{`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":168,"byte_end":170,"line_start":14,"line_end":14,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":" Or","highlight_start":5,"highlight_end":7}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":163,"byte_end":163,"line_start":13,"line_end":13,"column_start":8,"column_end":8,"is_primary":true,"text":[{"text":" And","highlight_start":8,"highlight_end":8}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `(`, `,`, `=`, `{`, or `}`, found `Or`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:14:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m13\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m And\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `(`, `,`, `=`, `{`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m14\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Or\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `,`, `=`, or `}`, found `Num`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":209,"byte_end":209,"line_start":18,"line_end":18,"column_start":16,"column_end":16,"is_primary":false,"text":[{"text":" Str(String)","highlight_start":16,"highlight_end":16}],"label":"expected one of `,`, `=`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":214,"byte_end":217,"line_start":19,"line_end":19,"column_start":5,"column_end":8,"is_primary":true,"text":[{"text":" Num(f64)","highlight_start":5,"highlight_end":8}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":209,"byte_end":209,"line_start":18,"line_end":18,"column_start":16,"column_end":16,"is_primary":true,"text":[{"text":" Str(String)","highlight_start":16,"highlight_end":16}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `,`, `=`, or `}`, found `Num`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:19:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m18\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Str(String)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `,`, `=`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m19\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Num(f64)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `(`, `,`, `=`, `{`, or `}`, found `Foreach`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":254,"byte_end":254,"line_start":23,"line_end":23,"column_start":7,"column_end":7,"is_primary":false,"text":[{"text":" If","highlight_start":7,"highlight_end":7}],"label":"expected one of `(`, `,`, `=`, `{`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":259,"byte_end":266,"line_start":24,"line_end":24,"column_start":5,"column_end":12,"is_primary":true,"text":[{"text":" Foreach","highlight_start":5,"highlight_end":12}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":254,"byte_end":254,"line_start":23,"line_end":23,"column_start":7,"column_end":7,"is_primary":true,"text":[{"text":" If","highlight_start":7,"highlight_end":7}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `(`, `,`, `=`, `{`, or `}`, found `Foreach`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:24:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m23\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m If\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `(`, `,`, `=`, `{`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m24\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Foreach\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `(`, `,`, `=`, `{`, or `}`, found `While`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":266,"byte_end":266,"line_start":24,"line_end":24,"column_start":12,"column_end":12,"is_primary":false,"text":[{"text":" Foreach","highlight_start":12,"highlight_end":12}],"label":"expected one of `(`, `,`, `=`, `{`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":271,"byte_end":276,"line_start":25,"line_end":25,"column_start":5,"column_end":10,"is_primary":true,"text":[{"text":" While","highlight_start":5,"highlight_end":10}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":266,"byte_end":266,"line_start":24,"line_end":24,"column_start":12,"column_end":12,"is_primary":true,"text":[{"text":" Foreach","highlight_start":12,"highlight_end":12}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `(`, `,`, `=`, `{`, or `}`, found `While`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:25:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m24\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Foreach\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `(`, `,`, `=`, `{`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m25\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m While\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `(`, `,`, `=`, `{`, or `}`, found `To`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":276,"byte_end":276,"line_start":25,"line_end":25,"column_start":10,"column_end":10,"is_primary":false,"text":[{"text":" While","highlight_start":10,"highlight_end":10}],"label":"expected one of `(`, `,`, `=`, `{`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":281,"byte_end":283,"line_start":26,"line_end":26,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":" To","highlight_start":5,"highlight_end":7}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":276,"byte_end":276,"line_start":25,"line_end":25,"column_start":10,"column_end":10,"is_primary":true,"text":[{"text":" While","highlight_start":10,"highlight_end":10}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `(`, `,`, `=`, `{`, or `}`, found `To`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:26:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m25\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m While\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `(`, `,`, `=`, `{`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m26\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m To\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `(`, `,`, `=`, `{`, or `}`, found `Close`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":315,"byte_end":315,"line_start":30,"line_end":30,"column_start":9,"column_end":9,"is_primary":false,"text":[{"text":" Open","highlight_start":9,"highlight_end":9}],"label":"expected one of `(`, `,`, `=`, `{`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":320,"byte_end":325,"line_start":31,"line_end":31,"column_start":5,"column_end":10,"is_primary":true,"text":[{"text":" Close","highlight_start":5,"highlight_end":10}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":315,"byte_end":315,"line_start":30,"line_end":30,"column_start":9,"column_end":9,"is_primary":true,"text":[{"text":" Open","highlight_start":9,"highlight_end":9}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `(`, `,`, `=`, `{`, or `}`, found `Close`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:31:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m30\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Open\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `(`, `,`, `=`, `{`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m31\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Close\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `,`, `=`, or `}`, found `ArithmeticOperator`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":367,"byte_end":367,"line_start":35,"line_end":35,"column_start":26,"column_end":26,"is_primary":false,"text":[{"text":" Literal(LiteralToken)","highlight_start":26,"highlight_end":26}],"label":"expected one of `,`, `=`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":372,"byte_end":390,"line_start":36,"line_end":36,"column_start":5,"column_end":23,"is_primary":true,"text":[{"text":" ArithmeticOperator(ArithmeticOperatorToken)","highlight_start":5,"highlight_end":23}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":367,"byte_end":367,"line_start":35,"line_end":35,"column_start":26,"column_end":26,"is_primary":true,"text":[{"text":" Literal(LiteralToken)","highlight_start":26,"highlight_end":26}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `,`, `=`, or `}`, found `ArithmeticOperator`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:36:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m35\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Literal(LiteralToken)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `,`, `=`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m36\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m ArithmeticOperator(ArithmeticOperatorToken)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `,`, `=`, or `}`, found `Statement`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":415,"byte_end":415,"line_start":36,"line_end":36,"column_start":48,"column_end":48,"is_primary":false,"text":[{"text":" ArithmeticOperator(ArithmeticOperatorToken)","highlight_start":48,"highlight_end":48}],"label":"expected one of `,`, `=`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":420,"byte_end":429,"line_start":37,"line_end":37,"column_start":5,"column_end":14,"is_primary":true,"text":[{"text":" Statement(StatementToken)","highlight_start":5,"highlight_end":14}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":415,"byte_end":415,"line_start":36,"line_end":36,"column_start":48,"column_end":48,"is_primary":true,"text":[{"text":" ArithmeticOperator(ArithmeticOperatorToken)","highlight_start":48,"highlight_end":48}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `,`, `=`, or `}`, found `Statement`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:37:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m36\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m ArithmeticOperator(ArithmeticOperatorToken)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `,`, `=`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m37\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Statement(StatementToken)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `,`, `=`, or `}`, found `Bracket`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":445,"byte_end":445,"line_start":37,"line_end":37,"column_start":30,"column_end":30,"is_primary":false,"text":[{"text":" Statement(StatementToken)","highlight_start":30,"highlight_end":30}],"label":"expected one of `,`, `=`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":450,"byte_end":457,"line_start":38,"line_end":38,"column_start":5,"column_end":12,"is_primary":true,"text":[{"text":" Bracket(BracketToken)","highlight_start":5,"highlight_end":12}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":445,"byte_end":445,"line_start":37,"line_end":37,"column_start":30,"column_end":30,"is_primary":true,"text":[{"text":" Statement(StatementToken)","highlight_start":30,"highlight_end":30}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `,`, `=`, or `}`, found `Bracket`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:38:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m37\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Statement(StatementToken)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `,`, `=`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m38\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Bracket(BracketToken)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"expected one of `,`, `=`, or `}`, found `Variable`","code":null,"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":471,"byte_end":471,"line_start":38,"line_end":38,"column_start":26,"column_end":26,"is_primary":false,"text":[{"text":" Bracket(BracketToken)","highlight_start":26,"highlight_end":26}],"label":"expected one of `,`, `=`, or `}`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/lexer.rs","byte_start":476,"byte_end":484,"line_start":39,"line_end":39,"column_start":5,"column_end":13,"is_primary":true,"text":[{"text":" Variable(variables::VariableToken)","highlight_start":5,"highlight_end":13}],"label":"unexpected token","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"missing `,`","code":null,"level":"help","spans":[{"file_name":"src/lexer.rs","byte_start":471,"byte_end":471,"line_start":38,"line_end":38,"column_start":26,"column_end":26,"is_primary":true,"text":[{"text":" Bracket(BracketToken)","highlight_start":26,"highlight_end":26}],"label":null,"suggested_replacement":",","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: expected one of `,`, `=`, or `}`, found `Variable`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:39:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m38\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Bracket(BracketToken)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected one of `,`, `=`, or `}`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: missing `,`\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m39\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Variable(variables::VariableToken)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9munexpected token\u001b[0m\n\n"} -{"message":"file not found for module `variables`","code":{"code":"E0583","explanation":"A file wasn't found for an out-of-line module.\n\nErroneous code example:\n\n```compile_fail,E0583\nmod file_that_doesnt_exist; // error: file not found for module\n\nfn main() {}\n```\n\nPlease be sure that a file corresponding to the module exists. If you\nwant to use a module named `file_that_doesnt_exist`, you need to have a file\nnamed `file_that_doesnt_exist.rs` or `file_that_doesnt_exist/mod.rs` in the\nsame directory.\n"},"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":0,"byte_end":18,"line_start":1,"line_end":1,"column_start":1,"column_end":19,"is_primary":true,"text":[{"text":"pub mod variables;","highlight_start":1,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"to create the module `variables`, create file \"src/lexer/variables.rs\" or \"src/lexer/variables/mod.rs\"","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0583]\u001b[0m\u001b[0m\u001b[1m: file not found for module `variables`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:1:1\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mpub mod variables;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: to create the module `variables`, create file \"src/lexer/variables.rs\" or \"src/lexer/variables/mod.rs\"\u001b[0m\n\n"} -{"message":"cannot find type `VariableToken` in module `variables`","code":{"code":"E0412","explanation":"A used type name is not in scope.\n\nErroneous code examples:\n\n```compile_fail,E0412\nimpl Something {} // error: type name `Something` is not in scope\n\n// or:\n\ntrait Foo {\n fn bar(N); // error: type name `N` is not in scope\n}\n\n// or:\n\nfn foo(x: T) {} // type name `T` is not in scope\n```\n\nTo fix this error, please verify you didn't misspell the type name, you did\ndeclare it or imported it into the scope. Examples:\n\n```\nstruct Something;\n\nimpl Something {} // ok!\n\n// or:\n\ntrait Foo {\n type N;\n\n fn bar(_: Self::N); // ok!\n}\n\n// or:\n\nfn foo(x: T) {} // ok!\n```\n\nAnother case that causes this error is when a type is imported into a parent\nmodule. To fix this, you can follow the suggestion and use File directly or\n`use super::File;` which will import the types from the parent namespace. An\nexample that causes this error is below:\n\n```compile_fail,E0412\nuse std::fs::File;\n\nmod foo {\n fn some_function(f: File) {}\n}\n```\n\n```\nuse std::fs::File;\n\nmod foo {\n // either\n use super::File;\n // or\n // use std::fs::File;\n fn foo(f: File) {}\n}\n# fn main() {} // don't insert it for us; that'll break imports\n```\n"},"level":"error","spans":[{"file_name":"src/lexer.rs","byte_start":496,"byte_end":509,"line_start":39,"line_end":39,"column_start":25,"column_end":38,"is_primary":true,"text":[{"text":" Variable(variables::VariableToken)","highlight_start":25,"highlight_end":38}],"label":"not found in `variables`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `VariableToken` in module `variables`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/lexer.rs:39:25\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m39\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Variable(variables::VariableToken)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in `variables`\u001b[0m\n\n"} -{"message":"unused import: `std::fs`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":18,"byte_end":25,"line_start":2,"line_end":2,"column_start":5,"column_end":12,"is_primary":true,"text":[{"text":"use std::fs;","highlight_start":5,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":14,"byte_end":26,"line_start":2,"line_end":2,"column_start":1,"column_end":13,"is_primary":true,"text":[{"text":"use std::fs;","highlight_start":1,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `std::fs`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:2:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m2\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::fs;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"} -{"message":"aborting due to 17 previous errors; 1 warning emitted","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 17 previous errors; 1 warning emitted\u001b[0m\n\n"} -{"message":"Some errors have detailed explanations: E0412, E0583.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mSome errors have detailed explanations: E0412, E0583.\u001b[0m\n"} -{"message":"For more information about an error, try `rustc --explain E0412`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mFor more information about an error, try `rustc --explain E0412`.\u001b[0m\n"} diff --git a/kabel-rs/target/debug/deps/kabel_rs-b7a5db911f8343d3.d b/kabel-rs/target/debug/deps/kabel_rs-b7a5db911f8343d3.d deleted file mode 100644 index 10fe72e..0000000 --- a/kabel-rs/target/debug/deps/kabel_rs-b7a5db911f8343d3.d +++ /dev/null @@ -1,6 +0,0 @@ -/home/tm85/git/kabel/kabel-rs/target/debug/deps/kabel_rs-b7a5db911f8343d3: src/main.rs src/lexer.rs - -/home/tm85/git/kabel/kabel-rs/target/debug/deps/kabel_rs-b7a5db911f8343d3.d: src/main.rs src/lexer.rs - -src/main.rs: -src/lexer.rs: diff --git a/kabel-rs/target/debug/incremental/kabel_rs-2dfctajrnpnqg/s-gshw4oxylk-ugb9md-working/dep-graph.part.bin b/kabel-rs/target/debug/incremental/kabel_rs-2dfctajrnpnqg/s-gshw4oxylk-ugb9md-working/dep-graph.part.bin deleted file mode 100644 index 781cd6f..0000000 Binary files a/kabel-rs/target/debug/incremental/kabel_rs-2dfctajrnpnqg/s-gshw4oxylk-ugb9md-working/dep-graph.part.bin and /dev/null differ diff --git a/kabel-rs/target/debug/incremental/kabel_rs-2dfctajrnpnqg/s-gshw4oxylk-ugb9md.lock b/kabel-rs/target/debug/incremental/kabel_rs-2dfctajrnpnqg/s-gshw4oxylk-ugb9md.lock deleted file mode 100644 index e69de29..0000000 diff --git a/kabel-zig/build.zig b/kabel-zig/build.zig deleted file mode 100644 index 1c3929d..0000000 --- a/kabel-zig/build.zig +++ /dev/null @@ -1,91 +0,0 @@ -const std = @import("std"); - -// Although this function looks imperative, note that its job is to -// declaratively construct a build graph that will be executed by an external -// runner. -pub fn build(b: *std.Build) void { - // Standard target options allows the person running `zig build` to choose - // what target to build for. Here we do not override the defaults, which - // means any target is allowed, and the default is native. Other options - // for restricting supported target set are available. - const target = b.standardTargetOptions(.{}); - - // Standard optimization options allow the person running `zig build` to select - // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not - // set a preferred release mode, allowing the user to decide how to optimize. - const optimize = b.standardOptimizeOption(.{}); - - const lib = b.addStaticLibrary(.{ - .name = "kabel-zig", - // In this case the main source file is merely a path, however, in more - // complicated build scripts, this could be a generated file. - .root_source_file = .{ .path = "src/root.zig" }, - .target = target, - .optimize = optimize, - }); - - // This declares intent for the library to be installed into the standard - // location when the user invokes the "install" step (the default step when - // running `zig build`). - b.installArtifact(lib); - - const exe = b.addExecutable(.{ - .name = "kabel-zig", - .root_source_file = .{ .path = "src/main.zig" }, - .target = target, - .optimize = optimize, - }); - - // This declares intent for the executable to be installed into the - // standard location when the user invokes the "install" step (the default - // step when running `zig build`). - b.installArtifact(exe); - - // This *creates* a Run step in the build graph, to be executed when another - // step is evaluated that depends on it. The next line below will establish - // such a dependency. - const run_cmd = b.addRunArtifact(exe); - - // By making the run step depend on the install step, it will be run from the - // installation directory rather than directly from within the cache directory. - // This is not necessary, however, if the application depends on other installed - // files, this ensures they will be present and in the expected location. - run_cmd.step.dependOn(b.getInstallStep()); - - // This allows the user to pass arguments to the application in the build - // command itself, like this: `zig build run -- arg1 arg2 etc` - if (b.args) |args| { - run_cmd.addArgs(args); - } - - // This creates a build step. It will be visible in the `zig build --help` menu, - // and can be selected like this: `zig build run` - // This will evaluate the `run` step rather than the default, which is "install". - const run_step = b.step("run", "Run the app"); - run_step.dependOn(&run_cmd.step); - - // Creates a step for unit testing. This only builds the test executable - // but does not run it. - const lib_unit_tests = b.addTest(.{ - .root_source_file = .{ .path = "src/root.zig" }, - .target = target, - .optimize = optimize, - }); - - const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests); - - const exe_unit_tests = b.addTest(.{ - .root_source_file = .{ .path = "src/main.zig" }, - .target = target, - .optimize = optimize, - }); - - const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); - - // Similar to creating the run step earlier, this exposes a `test` step to - // the `zig build --help` menu, providing a way for the user to request - // running the unit tests. - const test_step = b.step("test", "Run unit tests"); - test_step.dependOn(&run_lib_unit_tests.step); - test_step.dependOn(&run_exe_unit_tests.step); -} diff --git a/kabel-zig/build.zig.zon b/kabel-zig/build.zig.zon deleted file mode 100644 index 826dca6..0000000 --- a/kabel-zig/build.zig.zon +++ /dev/null @@ -1,62 +0,0 @@ -.{ - .name = "kabel-zig", - // This is a [Semantic Version](https://semver.org/). - // In a future version of Zig it will be used for package deduplication. - .version = "0.0.0", - - // This field is optional. - // This is currently advisory only; Zig does not yet do anything - // with this value. - //.minimum_zig_version = "0.11.0", - - // This field is optional. - // Each dependency must either provide a `url` and `hash`, or a `path`. - // `zig build --fetch` can be used to fetch all dependencies of a package, recursively. - // Once all dependencies are fetched, `zig build` no longer requires - // internet connectivity. - .dependencies = .{ - // See `zig fetch --save ` for a command-line interface for adding dependencies. - //.example = .{ - // // When updating this field to a new URL, be sure to delete the corresponding - // // `hash`, otherwise you are communicating that you expect to find the old hash at - // // the new URL. - // .url = "https://example.com/foo.tar.gz", - // - // // This is computed from the file contents of the directory of files that is - // // obtained after fetching `url` and applying the inclusion rules given by - // // `paths`. - // // - // // This field is the source of truth; packages do not come from a `url`; they - // // come from a `hash`. `url` is just one of many possible mirrors for how to - // // obtain a package matching this `hash`. - // // - // // Uses the [multihash](https://multiformats.io/multihash/) format. - // .hash = "...", - // - // // When this is provided, the package is found in a directory relative to the - // // build root. In this case the package's hash is irrelevant and therefore not - // // computed. This field and `url` are mutually exclusive. - // .path = "foo", - //}, - }, - - // Specifies the set of files and directories that are included in this package. - // Only files and directories listed here are included in the `hash` that - // is computed for this package. - // Paths are relative to the build root. Use the empty string (`""`) to refer to - // the build root itself. - // A directory listed here means that all files within, recursively, are included. - .paths = .{ - // This makes *all* files, recursively, included in this package. It is generally - // better to explicitly list the files and directories instead, to insure that - // fetching from tarballs, file system paths, and version control all result - // in the same contents hash. - "", - // For example... - //"build.zig", - //"build.zig.zon", - //"src", - //"LICENSE", - //"README.md", - }, -} diff --git a/kabel-zig/src/lexer.zig b/kabel-zig/src/lexer.zig deleted file mode 100644 index 6d45186..0000000 --- a/kabel-zig/src/lexer.zig +++ /dev/null @@ -1,4 +0,0 @@ -const std = @import("std"); -const lexutils = @import("lexutils.zig"); - -pub fn lexer( diff --git a/kabel-zig/src/lexutil.zig b/kabel-zig/src/lexutil.zig deleted file mode 100644 index f788560..0000000 --- a/kabel-zig/src/lexutil.zig +++ /dev/null @@ -1,45 +0,0 @@ -const variables = @import("variables.zig"); - -const ArithmeticOperatorToken = enum { - Add, // + - Subtract, // - - Multiply, // * - Divide, // / - Exponentiate, // ^ - Modulus, // % -}; - -const BooleanOperatorToken = enum { - And, - Or, -}; - -const LiteralToken = union(enum) { - String: struct { // String (up to 256 chars) - value: [256]u8, - }, - Nuumber: struct { // Equivalent to TS 'Number' - value: f64, - }, -}; - -const StatementToken = enum { - If, // if - Foreach, // foreach [ of] : (block) - While, // while : (block) - To, // to [with ]: (block) -}; - -const BracketToken = enum { - Open, // ( - Close, // ) -}; - -pub const Token = union(enum) { - Literal: LiteralToken, - ArithmeticOperator: ArithmeticOperatorToken, - BooleanOperator: BooleanOperatorToken, - Statement: StatementToken, - Bracket: BracketToken, - Variable: variables.VariableToken, -}; diff --git a/kabel-zig/src/main.zig b/kabel-zig/src/main.zig deleted file mode 100644 index 3798875..0000000 --- a/kabel-zig/src/main.zig +++ /dev/null @@ -1,20 +0,0 @@ -const std = @import("std"); -const lexer = @import("lexer.zig"); - -pub fn main() !u8 { - const stdout_fd = std.io.getStdOut().writer(); - var bw = std.io.bufferedWriter(stdout_fd); - const stdout = bw.writer(); - - try stdout.print("Run `zig build test` to run the tests.\n", .{}); - - try bw.flush(); // don't forget to flush! - return 0; -} - -//test "simple test" { -// var list = std.ArrayList(i32).init(std.testing.allocator); -// defer list.deinit(); // try commenting this out and see if zig detects the memory leak! -// try list.append(42); -// try std.testing.expectEqual(@as(i32, 42), list.pop()); -//} diff --git a/kabel-zig/src/modules.zig b/kabel-zig/src/modules.zig deleted file mode 100644 index 8775cd7..0000000 --- a/kabel-zig/src/modules.zig +++ /dev/null @@ -1,8 +0,0 @@ -pub const Modules = union(enum) { - Thruster: struct { - on: -}; - -pub const ModuleVar = union(enum) { - -}; diff --git a/kabel-zig/src/root.zig b/kabel-zig/src/root.zig deleted file mode 100644 index ecfeade..0000000 --- a/kabel-zig/src/root.zig +++ /dev/null @@ -1,10 +0,0 @@ -const std = @import("std"); -const testing = std.testing; - -export fn add(a: i32, b: i32) i32 { - return a + b; -} - -test "basic add functionality" { - try testing.expect(add(3, 7) == 10); -} diff --git a/kabel-zig/src/variables.zig b/kabel-zig/src/variables.zig deleted file mode 100644 index e7044ce..0000000 --- a/kabel-zig/src/variables.zig +++ /dev/null @@ -1,7 +0,0 @@ -const modules = @import("modules.zig"); - -pub const VariableToken = union(enum) { - Module: modules.ModuleVar, - Number: f64, - String: [256]u8, -}; diff --git a/kabel.py b/kabel.py deleted file mode 100644 index 2a7a1a7..0000000 --- a/kabel.py +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env python3 - -import sys, enum - -class ModuleType(enum.Enum): - Basic = - Thruster = enum.auto() - Hub = enum.auto() - -class TokenType(enum.Enum): - Declarator = enum.auto() - Arithmetic = enum.auto() - Literal = enum.auto() - Variable = enum.auto() - - - -KEYWORDS = [ - "if", # if - "to", # function definition - "using", # arg introducers - "by", # " - "with", # " - "foreach", # for - "it" # iterator -] - -STATEMENT_CLASSIFIERS = [ - "if", - "to", - "foreach" -] - -KEYWORDS_ACCEPT = { - "if": -} - -mem = { - "w": [], # Current word being processed - "stno": 0, # Number of statement being processed - "next": 0, - "if": - "cvl": 0, # Convolution level (paren depth) -} -program = [] - -with open(sys.argv[1]) as f: - prg = f.read().split(";") - - -def lexer(prg): - for statement in prg: # For statement in program - mem["stno"] = 0 - mem["w"] = "" - for char in list(statement): - if char == " " && !mem[""]: - # On spaces or new lines, begin a new word - mem["w"] = "" - continue - else if char == "(": - cvl - else: - mem["w"] += char - - #match mem["w"]: - # case "if": - # # Now parsing an if statement - # mem["if"]["active"] = True - # case - if mem["w"] in STATEMENT_CLASSIFIERS: - # Activate mode specified by word - # If mem["w"] is 'if', enable if mode - mem[mem["w"]]["active"] = True - - diff --git a/kabel/Cargo.toml b/kabel/Cargo.toml new file mode 100644 index 0000000..070f3fe --- /dev/null +++ b/kabel/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "kabel" +version = "0.1.0" +edition = "2021" +authors = ["tm85 ", "core ", "ghostly_zsh "] +description = "A dead-simple scripting language for use in games" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +libkabel = { version = "0.1", path = "../libkabel" } \ No newline at end of file diff --git a/kabel-rs/src/main.rs b/kabel/src/main.rs similarity index 83% rename from kabel-rs/src/main.rs rename to kabel/src/main.rs index ad3e1ec..7d8b432 100644 --- a/kabel-rs/src/main.rs +++ b/kabel/src/main.rs @@ -1,13 +1,8 @@ -use lexutil::Token; use std::env; use std::error::Error; use std::fs::File; use std::io::{self, Read}; - -mod lexer; -mod lexutil; -mod modules; -mod variables; +use libkabel::lexutil::Token; fn main() -> Result<(), Box> { let argv: Vec = env::args().collect(); @@ -33,10 +28,9 @@ fn main() -> Result<(), Box> { let mut text_source = String::new(); source_fd.read_to_string(&mut text_source)?; - dbg!(&text_source); // Lex! - let lexed: Vec = match lexer::lexer(&text_source) { + let lexed: Vec = match libkabel::lexer::lexer(&text_source) { Err(e) => { eprintln!("Lexer fail with {}", e); std::process::exit(1); @@ -44,7 +38,5 @@ fn main() -> Result<(), Box> { Ok(lexed) => lexed, }; - dbg!(lexed.len(), lexed); - Ok(()) } diff --git a/kabel-rs/Cargo.toml b/libkabel/Cargo.toml similarity index 82% rename from kabel-rs/Cargo.toml rename to libkabel/Cargo.toml index 39cceab..135642e 100644 --- a/kabel-rs/Cargo.toml +++ b/libkabel/Cargo.toml @@ -1,8 +1,9 @@ [package] -name = "kabel-rs" +name = "libkabel" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +tracing = "0.1" \ No newline at end of file diff --git a/libkabel/src/errors.rs b/libkabel/src/errors.rs new file mode 100644 index 0000000..6f3c8d1 --- /dev/null +++ b/libkabel/src/errors.rs @@ -0,0 +1,3 @@ +pub enum Error { + +} \ No newline at end of file diff --git a/kabel-rs/src/lexer.rs b/libkabel/src/lexer.rs similarity index 97% rename from kabel-rs/src/lexer.rs rename to libkabel/src/lexer.rs index 4e2d281..07b8ffd 100644 --- a/kabel-rs/src/lexer.rs +++ b/libkabel/src/lexer.rs @@ -1,6 +1,7 @@ use crate::lexutil; use lexutil::{ArithOperator, Bracket, Literal, Statement, Token}; use std::error::Error; +use tracing::debug; #[derive(Debug)] enum State { @@ -11,7 +12,7 @@ enum State { } pub fn lexer(text_source: &str) -> Result, Box> { - println!("Lexing!"); + debug!("lexing!"); let mut current_token = String::new(); let mut lexed = Vec::new(); @@ -31,7 +32,6 @@ pub fn lexer(text_source: &str) -> Result, Box> { // If next char is an unescaped quote if let Some(c_peek) = chars.peek() { if c != '\\' && *c_peek == '\"' { - dbg!("hi"); chars.next(); current_token.push(c); let tok_cpy = current_token.clone(); @@ -42,7 +42,6 @@ pub fn lexer(text_source: &str) -> Result, Box> { current_token.push(c); } } else { - dbg!("h"); continue; // we're at the end. we should bring a user error // because this string was not properly delimited } @@ -145,7 +144,7 @@ pub fn lexer(text_source: &str) -> Result, Box> { } } } - dbg!(&c, &state, ¤t_token, &lexed); + debug!("{} {:?} {} {:?}", &c, &state, ¤t_token, &lexed); } Ok(lexed) diff --git a/kabel-rs/src/lexutil.rs b/libkabel/src/lexutil.rs similarity index 100% rename from kabel-rs/src/lexutil.rs rename to libkabel/src/lexutil.rs diff --git a/libkabel/src/lib.rs b/libkabel/src/lib.rs new file mode 100644 index 0000000..e2974be --- /dev/null +++ b/libkabel/src/lib.rs @@ -0,0 +1,5 @@ +pub mod errors; +pub mod lexer; +pub mod lexutil; +pub mod modules; +pub mod variables; \ No newline at end of file diff --git a/kabel-rs/src/modules.rs b/libkabel/src/modules.rs similarity index 100% rename from kabel-rs/src/modules.rs rename to libkabel/src/modules.rs diff --git a/kabel-rs/src/variables.rs b/libkabel/src/variables.rs similarity index 100% rename from kabel-rs/src/variables.rs rename to libkabel/src/variables.rs