[INFO] cloning repository https://github.com/huytd/rust-webapp-template [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/huytd/rust-webapp-template" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhuytd%2Frust-webapp-template", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhuytd%2Frust-webapp-template'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5b927653f31d925bd8520706b01cafe010b81543 [INFO] checking huytd/rust-webapp-template against try#3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f for pr-87248 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhuytd%2Frust-webapp-template" "/workspace/builds/worker-2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/huytd/rust-webapp-template on toolchain 3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/huytd/rust-webapp-template [INFO] finished tweaking git repo https://github.com/huytd/rust-webapp-template [INFO] tweaked toml for git repo https://github.com/huytd/rust-webapp-template written to /workspace/builds/worker-2/source/Cargo.toml [INFO] crate git repo https://github.com/huytd/rust-webapp-template already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded num-traits v0.1.37 [INFO] [stderr] Downloaded serde v1.0.6 [INFO] [stderr] Downloaded stdweb v0.1.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 2f2713b63722b98a644856274dffc6185ff300e00b34ad530951bab0f82cc0b7 [INFO] running `Command { std: "docker" "start" "-a" "2f2713b63722b98a644856274dffc6185ff300e00b34ad530951bab0f82cc0b7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2f2713b63722b98a644856274dffc6185ff300e00b34ad530951bab0f82cc0b7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2f2713b63722b98a644856274dffc6185ff300e00b34ad530951bab0f82cc0b7", kill_on_drop: false }` [INFO] [stdout] 2f2713b63722b98a644856274dffc6185ff300e00b34ad530951bab0f82cc0b7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+3e59a8c2f14152ccc92a6c079f592dc2dc6fa93f" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d2262c1519a8502e2680496637e003cd50761009024f17731d2f107ae9df3075 [INFO] running `Command { std: "docker" "start" "-a" "d2262c1519a8502e2680496637e003cd50761009024f17731d2f107ae9df3075", kill_on_drop: false }` [INFO] [stderr] Checking serde v1.0.6 [INFO] [stderr] Checking serde_json v1.0.2 [INFO] [stderr] Checking stdweb v0.1.0 [INFO] [stdout] {"reason":"compiler-message","package_id":"stdweb 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)","manifest_path":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"stdweb","src_path":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/lib.rs","edition":"2015","doc":true,"doctest":true,"test":true},"message":{"message":"recursion limit reached while expanding `_js_impl!`","code":null,"level":"error","spans":[{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":true,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5170,"byte_end":5274,"line_start":134,"line_end":134,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5648,"byte_end":5773,"line_start":142,"line_end":142,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5648,"byte_end":5773,"line_start":142,"line_end":142,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5648,"byte_end":5773,"line_start":142,"line_end":142,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4703,"byte_end":4806,"line_start":126,"line_end":126,"column_start":9,"column_end":112,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":112}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5170,"byte_end":5274,"line_start":134,"line_end":134,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5170,"byte_end":5274,"line_start":134,"line_end":134,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5170,"byte_end":5274,"line_start":134,"line_end":134,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5648,"byte_end":5773,"line_start":142,"line_end":142,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5648,"byte_end":5773,"line_start":142,"line_end":142,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5170,"byte_end":5274,"line_start":134,"line_end":134,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5170,"byte_end":5274,"line_start":134,"line_end":134,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5170,"byte_end":5274,"line_start":134,"line_end":134,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5170,"byte_end":5274,"line_start":134,"line_end":134,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5170,"byte_end":5274,"line_start":134,"line_end":134,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3903,"byte_end":4022,"line_start":114,"line_end":114,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5892,"byte_end":5997,"line_start":146,"line_end":146,"column_start":9,"column_end":114,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":9,"highlight_end":114}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3641,"byte_end":3760,"line_start":110,"line_end":110,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5648,"byte_end":5773,"line_start":142,"line_end":142,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5648,"byte_end":5773,"line_start":142,"line_end":142,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":3287,"byte_end":3391,"line_start":102,"line_end":102,"column_start":9,"column_end":113,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":9,"highlight_end":113}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":4165,"byte_end":4284,"line_start":118,"line_end":118,"column_start":9,"column_end":128,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":128}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6134,"byte_end":6259,"line_start":150,"line_end":150,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":5648,"byte_end":5773,"line_start":142,"line_end":142,"column_start":9,"column_end":134,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":9,"highlight_end":134}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":6385,"byte_end":6434,"line_start":155,"line_end":155,"column_start":13,"column_end":62,"is_primary":false,"text":[{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":13,"highlight_end":62}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":13134,"byte_end":13184,"line_start":310,"line_end":310,"column_start":27,"column_end":77,"is_primary":false,"text":[{"text":" _js_impl!( @call [_js_impl!( @stringify [$($flags)*] -> $($token)* ), [$($flags)*]] [] -> $($token)* )","highlight_start":27,"highlight_end":77}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/initialization.rs","byte_start":291,"byte_end":3189,"line_start":17,"line_end":82,"column_start":5,"column_end":7,"is_primary":false,"text":[{"text":" js! { @(no_return)","highlight_start":5,"highlight_end":23},{"text":" Module.STDWEB = {};","highlight_start":1,"highlight_end":28},{"text":" Module.STDWEB.to_js = function to_js( address ) {","highlight_start":1,"highlight_end":58},{"text":" var kind = HEAPU8[ address + 12 ];","highlight_start":1,"highlight_end":47},{"text":" if( kind === 0 ) {","highlight_start":1,"highlight_end":31},{"text":" return undefined;","highlight_start":1,"highlight_end":34},{"text":" } else if( kind === 1 ) {","highlight_start":1,"highlight_end":38},{"text":" return null;","highlight_start":1,"highlight_end":29},{"text":" } else if( kind === 2 ) {","highlight_start":1,"highlight_end":38},{"text":" return HEAP32[ address / 4 ];","highlight_start":1,"highlight_end":46},{"text":" } else if( kind === 3 ) {","highlight_start":1,"highlight_end":38},{"text":" return HEAPF64[ address / 8 ];","highlight_start":1,"highlight_end":47},{"text":" } else if( kind === 4 ) {","highlight_start":1,"highlight_end":38},{"text":" var pointer = HEAPU32[ address / 4 ];","highlight_start":1,"highlight_end":54},{"text":" var length = HEAPU32[ (address + 4) / 4 ];","highlight_start":1,"highlight_end":59},{"text":" return Module.STDWEB.to_js_string( pointer, length );","highlight_start":1,"highlight_end":70},{"text":" } else if( kind === 5 ) {","highlight_start":1,"highlight_end":38},{"text":" return false;","highlight_start":1,"highlight_end":30},{"text":" } else if( kind === 6 ) {","highlight_start":1,"highlight_end":38},{"text":" return true;","highlight_start":1,"highlight_end":29},{"text":" } else if( kind === 7 ) {","highlight_start":1,"highlight_end":38},{"text":" var pointer = HEAPU32[ address / 4 ];","highlight_start":1,"highlight_end":54},{"text":" var length = HEAPU32[ (address + 4) / 4 ];","highlight_start":1,"highlight_end":59},{"text":" var output = [];","highlight_start":1,"highlight_end":33},{"text":" for( var i = 0; i < length; ++i ) {","highlight_start":1,"highlight_end":52},{"text":" output.push( Module.STDWEB.to_js( pointer + i * 16 ) );","highlight_start":1,"highlight_end":76},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" return output;","highlight_start":1,"highlight_end":31},{"text":" } else if( kind === 8 ) {","highlight_start":1,"highlight_end":38},{"text":" var value_array_pointer = HEAPU32[ address / 4 ];","highlight_start":1,"highlight_end":66},{"text":" var length = HEAPU32[ (address + 4) / 4 ];","highlight_start":1,"highlight_end":59},{"text":" var key_array_pointer = HEAPU32[ (address + 8) / 4 ];","highlight_start":1,"highlight_end":70},{"text":" var output = {};","highlight_start":1,"highlight_end":33},{"text":" for( var i = 0; i < length; ++i ) {","highlight_start":1,"highlight_end":52},{"text":" var key_pointer = HEAPU32[ (key_array_pointer + i * 8) / 4 ];","highlight_start":1,"highlight_end":82},{"text":" var key_length = HEAPU32[ (key_array_pointer + 4 + i * 8) / 4 ];","highlight_start":1,"highlight_end":85},{"text":" var key = Module.STDWEB.to_js_string( key_pointer, key_length );","highlight_start":1,"highlight_end":85},{"text":" var value = Module.STDWEB.to_js( value_array_pointer + i * 16 );","highlight_start":1,"highlight_end":85},{"text":" output[ key ] = value;","highlight_start":1,"highlight_end":43},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" return output;","highlight_start":1,"highlight_end":31},{"text":" } else if( kind === 9 ) {","highlight_start":1,"highlight_end":38},{"text":" return Module.STDWEB.acquire_js_reference( HEAP32[ address / 4 ] );","highlight_start":1,"highlight_end":84},{"text":" } else if( kind === 10 ) {","highlight_start":1,"highlight_end":39},{"text":" var adapter_pointer = HEAPU32[ address / 4 ];","highlight_start":1,"highlight_end":62},{"text":" var pointer = HEAPU32[ (address + 4) / 4 ];","highlight_start":1,"highlight_end":60},{"text":" var deallocator_pointer = HEAPU32[ (address + 8) / 4 ];","highlight_start":1,"highlight_end":72},{"text":" var output = function() {","highlight_start":1,"highlight_end":42},{"text":" var args = _malloc( 16 );","highlight_start":1,"highlight_end":46},{"text":" Module.STDWEB.from_js( args, arguments );","highlight_start":1,"highlight_end":62},{"text":" Runtime.dynCall( \"vii\", adapter_pointer, [pointer, args] );","highlight_start":1,"highlight_end":80},{"text":" var result = Module.STDWEB.tmp;","highlight_start":1,"highlight_end":52},{"text":" Module.STDWEB.tmp = null;","highlight_start":1,"highlight_end":46},{"text":"","highlight_start":1,"highlight_end":1},{"text":" return result;","highlight_start":1,"highlight_end":35},{"text":" };","highlight_start":1,"highlight_end":19},{"text":"","highlight_start":1,"highlight_end":1},{"text":" output.drop = function() {","highlight_start":1,"highlight_end":43},{"text":" output.drop = null;","highlight_start":1,"highlight_end":40},{"text":" Runtime.dynCall( \"vi\", deallocator_pointer, [pointer] );","highlight_start":1,"highlight_end":77},{"text":" };","highlight_start":1,"highlight_end":19},{"text":"","highlight_start":1,"highlight_end":1},{"text":" return output;","highlight_start":1,"highlight_end":31},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" };","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"js!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":13047,"byte_end":13351,"line_start":308,"line_end":316,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! js {","highlight_start":1,"highlight_end":18},{"text":" (@($($flags:tt),*) $($token:tt)*) => {","highlight_start":1,"highlight_end":43},{"text":" _js_impl!( @call [_js_impl!( @stringify [$($flags)*] -> $($token)* ), [$($flags)*]] [] -> $($token)* )","highlight_start":1,"highlight_end":111},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" ($($token:tt)*) => {","highlight_start":1,"highlight_end":25},{"text":" _js_impl!( @call [_js_impl!( @stringify [] -> $($token)* ), []] [] -> $($token)* )","highlight_start":1,"highlight_end":91},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"_js_impl!","def_site_span":{"file_name":"/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs","byte_start":2251,"byte_end":12018,"line_start":89,"line_end":279,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! _js_impl {","highlight_start":1,"highlight_end":24},{"text":" (@_inc @_stringify \"0\" $($rest:tt)*) => { _js_impl!( @_stringify \"1\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"1\" $($rest:tt)*) => { _js_impl!( @_stringify \"2\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"2\" $($rest:tt)*) => { _js_impl!( @_stringify \"3\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"3\" $($rest:tt)*) => { _js_impl!( @_stringify \"4\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"4\" $($rest:tt)*) => { _js_impl!( @_stringify \"5\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"5\" $($rest:tt)*) => { _js_impl!( @_stringify \"6\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"6\" $($rest:tt)*) => { _js_impl!( @_stringify \"7\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"7\" $($rest:tt)*) => { _js_impl!( @_stringify \"8\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"8\" $($rest:tt)*) => { _js_impl!( @_stringify \"9\" $($rest)* ) };","highlight_start":1,"highlight_end":88},{"text":" (@_inc @_stringify \"9\" $($rest:tt)*) => { _js_impl!( @_stringify \"10\" $($rest)* ) };","highlight_start":1,"highlight_end":89},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$terminator:tt $($terminator_rest:tt)*] [$($out:tt)*] -> [] $next:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator_rest)*] [$($out)* ($terminator)] -> $next $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [] [$($out:tt)*] -> []) => {","highlight_start":1,"highlight_end":62},{"text":" concat!( $(concat! $out),* )","highlight_start":1,"highlight_end":37},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [($($inner:tt)*) $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [[$($inner:tt)*] $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"]\" $($terminator)*] [$($out)* (\"[\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [{$($inner:tt)*} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":126},{"text":" _js_impl!( @_stringify $arg_counter [\"}\" $($terminator)*] [$($out)* (\"{\")] -> [$($inner)*] [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":128},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [@{$arg:expr} $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":123},{"text":" _js_impl!( @_inc @_stringify $arg_counter [$($terminator)*] [$($out)* (\"Module.STDWEB.to_js($\") ($arg_counter) (\")\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":158},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [++ $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"++\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [-- $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":113},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"--\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":112},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [=== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"===\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [!== $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":114},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (\"!==\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt . $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":122},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\".\")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt] $($rest:tt)*) => {","highlight_start":1,"highlight_end":102},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token ))] -> [] $($rest)* )","highlight_start":1,"highlight_end":114},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@_stringify $arg_counter:tt [$($terminator:tt)*] [$($out:tt)*] -> [$token:tt $($remaining:tt)*] $($rest:tt)*) => {","highlight_start":1,"highlight_end":120},{"text":" _js_impl!( @_stringify $arg_counter [$($terminator)*] [$($out)* (stringify!( $token )) (\" \")] -> [$($remaining)*] $($rest)* )","highlight_start":1,"highlight_end":134},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@stringify [$($flags:tt)*] -> $($rest:tt)*) => {","highlight_start":1,"highlight_end":54},{"text":" _js_impl!( @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":51},{"text":" _js_impl!( @_stringify \"0\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" } else {","highlight_start":1,"highlight_end":17},{"text":" _js_impl!( @_stringify \"1\" [] [] -> [$($rest)*] )","highlight_start":1,"highlight_end":62},{"text":" })","highlight_start":1,"highlight_end":11},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if no_return in [no_return $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":99},{"text":" $($true_case)*","highlight_start":1,"highlight_end":23},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":81},{"text":" $($false_case)*","highlight_start":1,"highlight_end":24},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@if $condition:tt in [$token:tt $($rest:tt)*] {$($true_case:tt)*} else {$($false_case:tt)*}) => {","highlight_start":1,"highlight_end":103},{"text":" _js_impl!( @if $condition in [$($rest)*] {$($true_case)*} else {$($false_case)*} );","highlight_start":1,"highlight_end":92},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@prepare $memory_required:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":64},{"text":" (@prepare $memory_required:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":101},{"text":" let $name = $arg;","highlight_start":1,"highlight_end":26},{"text":" let $name = $crate::private::IntoNewtype::into_newtype( $name );","highlight_start":1,"highlight_end":73},{"text":" $memory_required += $crate::private::JsSerializableOwned::memory_required_owned( &$name );","highlight_start":1,"highlight_end":99},{"text":" _js_impl!( @prepare $memory_required [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@serialize $arena:ident [] [$($names:tt)*]) => {};","highlight_start":1,"highlight_end":56},{"text":" (@serialize $arena:ident [$arg:tt $($rest_args:tt)*] [$name:tt $($rest_names:tt)*]) => {","highlight_start":1,"highlight_end":93},{"text":" let mut $name = Some( $name );","highlight_start":1,"highlight_end":39},{"text":" let $name = $crate::private::JsSerializableOwned::into_js_owned( &mut $name, &$arena );","highlight_start":1,"highlight_end":96},{"text":" let $name = &$name as *const _;","highlight_start":1,"highlight_end":40},{"text":" _js_impl!( @serialize $arena [$($rest_args)*] [$($rest_names)*] );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt] [$a0_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":69},{"text":" $crate::private::emscripten_asm_const_int( $a0_name );","highlight_start":1,"highlight_end":63},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt] [$a0_name:tt $a1_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":88},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name );","highlight_start":1,"highlight_end":73},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":107},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name );","highlight_start":1,"highlight_end":83},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":126},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name );","highlight_start":1,"highlight_end":93},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":145},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name );","highlight_start":1,"highlight_end":103},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call_emscripten [$a0:tt $a1:tt $a2:tt $a3:tt $a4:tt $a5:tt] [$a0_name:tt $a1_name:tt $a2_name:tt $a3_name:tt $a4_name:tt $a5_name:tt $($arg_names:tt)*]) => {","highlight_start":1,"highlight_end":164},{"text":" $crate::private::emscripten_asm_const_int( $a0_name, $a1_name, $a2_name, $a3_name, $a4_name, $a5_name );","highlight_start":1,"highlight_end":113},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] ->) => {","highlight_start":1,"highlight_end":65},{"text":" // It'd be nice to put at least some of this inside a function inside the crate,","highlight_start":1,"highlight_end":89},{"text":" // but then it wouldn't work (I tried!) as the string with the code wouldn't be","highlight_start":1,"highlight_end":88},{"text":" // passed as a direct reference to a constant, and Emscripten needs that to actually","highlight_start":1,"highlight_end":93},{"text":" // use the JavaScript code we're passing to it.","highlight_start":1,"highlight_end":56},{"text":" {","highlight_start":1,"highlight_end":10},{"text":" if cfg!( test ) {","highlight_start":1,"highlight_end":30},{"text":" $crate::initialize();","highlight_start":1,"highlight_end":38},{"text":" }","highlight_start":1,"highlight_end":14},{"text":"","highlight_start":1,"highlight_end":1},{"text":" const CODE_STR: &'static str = _js_impl!(","highlight_start":1,"highlight_end":54},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":48},{"text":" concat!( $code, \"\\0\" )","highlight_start":1,"highlight_end":43},{"text":" } else {","highlight_start":1,"highlight_end":25},{"text":" concat!( \"Module.STDWEB.from_js($0, (function(){\", $code, \"})());\\0\" )","highlight_start":1,"highlight_end":91},{"text":" }","highlight_start":1,"highlight_end":18},{"text":" );","highlight_start":1,"highlight_end":15},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(dead_code)]","highlight_start":1,"highlight_end":32},{"text":" const CODE: *const u8 = CODE_STR as *const _ as *const u8;","highlight_start":1,"highlight_end":71},{"text":"","highlight_start":1,"highlight_end":1},{"text":" let mut memory_required = 0;","highlight_start":1,"highlight_end":41},{"text":" _js_impl!( @prepare memory_required [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":99},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_variables)]","highlight_start":1,"highlight_end":39},{"text":" let arena = $crate::private::PreallocatedArena::new( memory_required );","highlight_start":1,"highlight_end":84},{"text":"","highlight_start":1,"highlight_end":1},{"text":" _js_impl!( @serialize arena [$($args)*] [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":91},{"text":" arena.assert_no_free_space_left();","highlight_start":1,"highlight_end":47},{"text":"","highlight_start":1,"highlight_end":1},{"text":" $crate::private::noop( &mut memory_required );","highlight_start":1,"highlight_end":59},{"text":"","highlight_start":1,"highlight_end":1},{"text":" #[allow(unused_unsafe)]","highlight_start":1,"highlight_end":36},{"text":" unsafe {","highlight_start":1,"highlight_end":21},{"text":" _js_impl!(","highlight_start":1,"highlight_end":27},{"text":" @if no_return in [$($flags)*] {","highlight_start":1,"highlight_end":52},{"text":" _js_impl!( @call_emscripten [CODE $($args)*] [CODE a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":113},{"text":" } else {{","highlight_start":1,"highlight_end":30},{"text":" let mut result: $crate::private::SerializedValue = Default::default();","highlight_start":1,"highlight_end":95},{"text":" _js_impl!( @call_emscripten [CODE RESULT $($args)*] [CODE (&mut result as *mut _) a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] );","highlight_start":1,"highlight_end":144},{"text":" result.deserialize()","highlight_start":1,"highlight_end":45},{"text":" }}","highlight_start":1,"highlight_end":23},{"text":" )","highlight_start":1,"highlight_end":18},{"text":" }","highlight_start":1,"highlight_end":14},{"text":" }","highlight_start":1,"highlight_end":10},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> { $($inner:tt)* } $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> ( $($inner:tt)* ) $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> [ $($inner:tt)* ] $($rest:tt)*) => {","highlight_start":1,"highlight_end":96},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($inner)* $($rest)* );","highlight_start":1,"highlight_end":86},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> @{$arg:expr} $($rest:tt)*) => {","highlight_start":1,"highlight_end":91},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)* $arg] -> $($rest)* );","highlight_start":1,"highlight_end":80},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":" (@call [$code:expr, [$($flags:tt)*]] [$($args:tt)*] -> $token:tt $($rest:tt)*) => {","highlight_start":1,"highlight_end":88},{"text":" _js_impl!( @call [$code, [$($flags)*]] [$($args)*] -> $($rest)* );","highlight_start":1,"highlight_end":75},{"text":" };","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"consider adding a `#![recursion_limit=\"1500\"]` attribute to your crate (`stdweb`)","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: recursion limit reached while expanding `_js_impl!`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0m/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/macros.rs:110:9\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;12m110\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m _js_impl!( @_stringify $arg_counter [\")\" $($terminator)*] [$($out)* (\"(\")] -> [$($inner)*] [$($remaining)*] $($rest)* )\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\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/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/stdweb-0.1.0/src/webcore/initialization.rs:17: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;12m17\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m/\u001b[0m\u001b[0m \u001b[0m\u001b[0m js! { @(no_return)\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[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Module.STDWEB = {};\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[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m Module.STDWEB.to_js = function to_js( address ) {\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m20\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m var kind = HEAPU8[ address + 12 ];\u001b[0m\n\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[1m\u001b[38;5;12m81\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m };\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m82\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m };\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|______-\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12min this macro invocation\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: consider adding a `#![recursion_limit=\"1500\"]` attribute to your crate (`stdweb`)\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: this error originates in the macro `_js_impl` (in Nightly builds, run with -Z macro-backtrace for more info)\u001b[0m\n\n"}} [INFO] [stderr] error: could not compile `stdweb` due to 2 previous errors [INFO] [stdout] error: aborting due to previous error [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "d2262c1519a8502e2680496637e003cd50761009024f17731d2f107ae9df3075", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d2262c1519a8502e2680496637e003cd50761009024f17731d2f107ae9df3075", kill_on_drop: false }` [INFO] [stdout] d2262c1519a8502e2680496637e003cd50761009024f17731d2f107ae9df3075