diff --git a/Cargo.lock b/Cargo.lock index a2e8df9..512796b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,19 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +[[package]] +name = "ahash" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "0.7.20" @@ -43,9 +56,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -57,9 +70,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -76,17 +89,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -95,6 +108,21 @@ version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +[[package]] +name = "assert_cmd" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00ad3f3a942eee60335ab4342358c161ee296829e0d16ff42fc1d6cb07815467" +dependencies = [ + "anstyle", + "bstr", + "doc-comment", + "predicates", + "predicates-core", + "predicates-tree", + "wait-timeout", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -109,9 +137,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "block-buffer" @@ -129,6 +157,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" dependencies = [ "memchr", + "once_cell", + "regex-automata 0.1.10", "serde", ] @@ -186,9 +216,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.2" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" +checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" dependencies = [ "clap_builder", "clap_derive", @@ -196,21 +226,21 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.0", ] [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", "proc-macro2", @@ -220,9 +250,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "codespan-reporting" @@ -318,7 +348,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.10.0", "syn 1.0.109", ] @@ -339,7 +369,16 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" dependencies = [ - "derive_builder_macro", + "derive_builder_macro 0.12.0", +] + +[[package]] +name = "derive_builder" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f59169f400d8087f238c5c0c7db6a28af18681717f3b623227d92f397e938c7" +dependencies = [ + "derive_builder_macro 0.13.1", ] [[package]] @@ -354,13 +393,35 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder_core" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4ec317cc3e7ef0928b0ca6e4a634a4d6c001672ae210438cf114a83e56b018d" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_builder_macro" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" dependencies = [ - "derive_builder_core", + "derive_builder_core 0.12.0", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "870368c3fb35b8031abb378861d4460f573b92238ec2152c927a21f77e3e0127" +dependencies = [ + "derive_builder_core 0.13.1", "syn 1.0.109", ] @@ -370,6 +431,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + [[package]] name = "digest" version = "0.10.7" @@ -380,17 +447,33 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "doc-comment" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" + [[package]] name = "either" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", +] + [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -399,6 +482,19 @@ dependencies = [ "termcolor", ] +[[package]] +name = "env_logger" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e7cf40684ae96ade6232ed84582f40ce0a66efcd43a5117aef610534f8e0b8" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -413,7 +509,7 @@ checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -426,6 +522,15 @@ dependencies = [ "libc", ] +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + [[package]] name = "fixedbitset" version = "0.4.2" @@ -498,6 +603,17 @@ dependencies = [ "walkdir", ] +[[package]] +name = "graph-cycles" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a6ad932c6dd3cfaf16b66754a42f87bbeefd591530c4b6a8334270a7df3e853" +dependencies = [ + "ahash", + "petgraph", + "thiserror", +] + [[package]] name = "hashbrown" version = "0.14.3" @@ -587,6 +703,15 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -595,7 +720,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -607,7 +732,7 @@ dependencies = [ "hermit-abi", "io-lifetimes", "rustix", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -631,7 +756,7 @@ version = "0.2.1" dependencies = [ "anyhow", "clap", - "env_logger", + "env_logger 0.11.1", "parol", "parol_runtime", "regex", @@ -705,43 +830,47 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "owo-colors" -version = "3.5.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" [[package]] name = "parol" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9614cdb777f689380acd25a1870c7d2192ef9fd2878f9addd83f052ec8ef5b41" +checksum = "4b10cd90f274dc5b7d9eb2676c239ae709041f8d349a04940de27944cc1473a6" dependencies = [ "anyhow", - "bitflags 2.4.1", + "assert_cmd", + "bitflags 2.4.2", "cfg-if", "clap", - "derive_builder", - "env_logger", + "derive_builder 0.13.1", + "env_logger 0.10.2", "function_name", + "graph-cycles", "num_cpus", "owo-colors", "parol-macros", "parol_runtime", + "petgraph", "rand", "rand_regex", "rayon", "regex", - "regex-syntax 0.7.5", + "regex-syntax", "serde", "serde_json", "syn 2.0.32", "syntree", "syntree_layout", + "tempfile", "thiserror", "ts-rs", "ume", @@ -755,19 +884,19 @@ checksum = "bdd646301a99589f85ed580e3807ee2f7aa6529b900fd703f5a14716b7426b28" [[package]] name = "parol_runtime" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dee48c3d0637d296cbf848fb60421fac541e08dbecd52a29c45ffedee6b7258" +checksum = "520c3ecb19aef32899350c0974fd427d01ce47ebac54cce363f6a45b22979d42" dependencies = [ "anyhow", "codespan-reporting", - "derive_builder", + "derive_builder 0.12.0", "function_name", "log", "once_cell", "parol-macros", "petgraph", - "regex-automata", + "regex-automata 0.4.3", "syntree", "syntree_layout", "thiserror", @@ -887,11 +1016,38 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "predicates" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +dependencies = [ + "anstyle", + "difflib", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" + +[[package]] +name = "predicates-tree" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +dependencies = [ + "predicates-core", + "termtree", +] + [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -937,19 +1093,19 @@ dependencies = [ [[package]] name = "rand_regex" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8276e2c4e37f1907c587794d9b8b3334e1d44f36e05f8c13d61c50c19c264ae2" +checksum = "4bfbd599a8c757f89100e3ae559fb1ef9efa1cfd9276136862e3089dec627b31" dependencies = [ "rand", - "regex-syntax 0.7.5", + "regex-syntax", ] [[package]] name = "rayon" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -957,14 +1113,23 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "regex" version = "1.10.2" @@ -973,10 +1138,16 @@ checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick 1.0.1", "memchr", - "regex-automata", - "regex-syntax 0.8.2", + "regex-automata 0.4.3", + "regex-syntax", ] +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" + [[package]] name = "regex-automata" version = "0.4.3" @@ -985,15 +1156,9 @@ checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick 1.0.1", "memchr", - "regex-syntax 0.8.2", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - [[package]] name = "regex-syntax" version = "0.8.2" @@ -1011,7 +1176,7 @@ dependencies = [ "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1098,6 +1263,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + [[package]] name = "syn" version = "1.0.109" @@ -1138,6 +1309,20 @@ dependencies = [ "xml_writer", ] +[[package]] +name = "tempfile" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +dependencies = [ + "autocfg", + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "tera" version = "1.19.0" @@ -1170,6 +1355,12 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + [[package]] name = "thiserror" version = "1.0.40" @@ -1201,9 +1392,9 @@ dependencies = [ [[package]] name = "ts-rs" -version = "7.0.0" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ff1f8c90369bc172200013ac17ae86e7b5def580687df4e6127883454ff2b0" +checksum = "fc2cae1fc5d05d47aa24b64f9a4f7cba24cdc9187a2084dd97ac57bef5eccae6" dependencies = [ "thiserror", "ts-rs-macros", @@ -1211,9 +1402,9 @@ dependencies = [ [[package]] name = "ts-rs-macros" -version = "7.0.0" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f41cc0aeb7a4a55730188e147d3795a7349b501f8334697fd37629b896cdc2" +checksum = "73f7f9b821696963053a89a7bd8b292dc34420aea8294d7b225274d488f3ec92" dependencies = [ "Inflector", "proc-macro2", @@ -1323,6 +1514,15 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.3.3" @@ -1430,7 +1630,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets", + "windows-targets 0.48.0", ] [[package]] @@ -1439,7 +1639,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.0", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", ] [[package]] @@ -1448,13 +1657,28 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -1463,44 +1687,106 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "xml_writer" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a74a847d8392999f89e9668c4dd46283b91fd6fc1f34aa5ecf4ceaf8fa3258e" + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] diff --git a/Cargo.toml b/Cargo.toml index 2801d5c..db2e619 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,15 +14,15 @@ license = "MIT OR Apache-2.0" [dependencies] anyhow = "1.0" clap = { version = "4.3.1", features = ["derive", "cargo"] } -env_logger = "0.10.0" -parol_runtime = { version = "0.20.0", features = ["auto_generation"] } +env_logger = "0.11.1" +parol_runtime = { version = "0.20.1", features = ["auto_generation"] } regex = "1.8.4" tera = "1.19.0" thiserror = "1.0" [build-dependencies] -parol = "0.25.0" -parol_runtime = { version = "0.20.0", features = ["auto_generation"] } +parol = "0.26.1" +parol_runtime = { version = "0.20.1", features = ["auto_generation"] } # For faster builds. [profile.dev.build-override] diff --git a/build.rs b/build.rs index e69a9bb..13ba5b2 100644 --- a/build.rs +++ b/build.rs @@ -5,7 +5,7 @@ use parol_runtime::Report; fn main() { // CLI equivalent is: - // parol -f ./la_dfa_2_dot.par -e ./la_dfa_2_dot-exp.par -p ./src/la_dfa_2_dot_parser.rs -a ./src/la_dfa_2_dot_grammar_trait.rs -t LaDfa2DotGrammar -m la_dfa_2_dot_grammar -g + // parol -f ./la_dfa_2_dot.par -e ./la_dfa_2_dot-exp.par -p ./src/la_dfa_2_dot_parser.rs -a ./src/la_dfa_2_dot_grammar_trait.rs -t LaDfa2DotGrammar -m la_dfa_2_dot_grammar -g -b if let Err(err) = Builder::with_explicit_output_dir("src") .max_lookahead(7) .unwrap() @@ -14,6 +14,7 @@ fn main() { .parser_output_file("la_dfa_2_dot_parser.rs") .actions_output_file("la_dfa_2_dot_grammar_trait.rs") .enable_auto_generation() + .minimize_boxed_types() .user_type_name("LaDfa2DotGrammar") .user_trait_module_name("la_dfa_2_dot_grammar") .trim_parse_tree() diff --git a/src/la_dfa_2_dot_grammar.rs b/src/la_dfa_2_dot_grammar.rs index c5da78c..824fbb3 100644 --- a/src/la_dfa_2_dot_grammar.rs +++ b/src/la_dfa_2_dot_grammar.rs @@ -45,11 +45,11 @@ impl<'t> Ident<'t> { impl<'t> MemberValues<'t> { fn get_member(&self, ident: &str) -> Option<&ConstVal<'t>> { if self.member_value.ident.text() == ident { - Some(self.member_value.const_val.as_ref()) + Some(&self.member_value.const_val) } else { self.member_values_list.iter().find_map(|m| { if m.member_value.ident.text() == ident { - Some(m.member_value.const_val.as_ref()) + Some(&m.member_value.const_val) } else { None } @@ -114,10 +114,10 @@ impl LaDfa2DotGrammar<'_> { ConstVal::Number(to), ConstVal::Number(prod), ) = ( - cv_list.const_val.as_ref(), - cv_list.const_val_list_list[0].const_val.as_ref(), - cv_list.const_val_list_list[1].const_val.as_ref(), - cv_list.const_val_list_list[2].const_val.as_ref(), + &cv_list.const_val, + &cv_list.const_val_list_list[0].const_val, + &cv_list.const_val_list_list[1].const_val, + &cv_list.const_val_list_list[2].const_val, ) { let id = Self::extract_value(id); let term = Self::extract_value(term); @@ -296,7 +296,7 @@ impl<'t> LaDfa2DotGrammarTrait<'t> for LaDfa2DotGrammar<'t> { let ident = q.qualified_ident.ident.ident.text(); if ident == "LookaheadDFA" { if let Some(qualified_val) = q.qualified_val_opt.as_ref() { - if let StructOrTupleVal::StructVal(struct_val) = &*qualified_val.struct_or_tuple_val + if let StructOrTupleVal::StructVal(struct_val) = &qualified_val.struct_or_tuple_val { self.process_lookahead_struct(&struct_val.struct_val)?; } @@ -304,7 +304,7 @@ impl<'t> LaDfa2DotGrammarTrait<'t> for LaDfa2DotGrammar<'t> { } else if ident == "Trans" { if let Some(qualified_val) = q.qualified_val_opt.as_ref() { if let StructOrTupleVal::TupleStructVal(tuple_val) = - &*qualified_val.struct_or_tuple_val + &qualified_val.struct_or_tuple_val { self.process_trans_tuple(&tuple_val.tuple_struct_val.tuple_val)?; } diff --git a/src/la_dfa_2_dot_grammar_trait.rs b/src/la_dfa_2_dot_grammar_trait.rs index 4941476..99530ee 100644 --- a/src/la_dfa_2_dot_grammar_trait.rs +++ b/src/la_dfa_2_dot_grammar_trait.rs @@ -288,7 +288,7 @@ pub struct ItemUseStatement {} #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ItemConstDeclaration<'t> { - pub const_declaration: Box>, + pub const_declaration: ConstDeclaration<'t>, } /// @@ -300,8 +300,8 @@ pub struct ItemConstDeclaration<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ConstDeclarationConstPreambleTypeSpecAssignConstValSemicolon<'t> { - pub const_preamble: Box>, - pub const_val: Box>, + pub const_preamble: ConstPreamble<'t>, + pub const_val: ConstVal<'t>, } /// @@ -323,7 +323,7 @@ pub struct ConstDeclarationConstPreambleSkip {} #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ConstQualifierConstQualifierOptConst<'t> { - pub const_qualifier_opt: Option>>, + pub const_qualifier_opt: Option>, pub r#const: Token<'t>, /* const */ } @@ -348,7 +348,7 @@ pub struct ConstQualifierStatic<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ConstValNumber<'t> { - pub number: Box>, + pub number: Number<'t>, } /// @@ -360,7 +360,7 @@ pub struct ConstValNumber<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ConstValString<'t> { - pub string: Box>, + pub string: String<'t>, } /// @@ -420,7 +420,7 @@ pub struct StructOrTupleValStructVal<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct StructOrTupleValTupleStructVal<'t> { - pub tuple_struct_val: Box>, + pub tuple_struct_val: TupleStructVal<'t>, } /// @@ -432,7 +432,7 @@ pub struct StructOrTupleValTupleStructVal<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct TypeSpecQualifiedIdent<'t> { - pub qualified_ident: Box>, + pub qualified_ident: QualifiedIdent<'t>, } /// @@ -444,7 +444,7 @@ pub struct TypeSpecQualifiedIdent<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct TypeSpecArrayType<'t> { - pub array_type: Box>, + pub array_type: ArrayType<'t>, } /// @@ -468,7 +468,7 @@ pub struct TypeSpecTupleType<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct StringQuotedString<'t> { - pub quoted_string: Box>, + pub quoted_string: QuotedString<'t>, } /// @@ -480,7 +480,7 @@ pub struct StringQuotedString<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct StringRawString<'t> { - pub raw_string: Box>, + pub raw_string: RawString<'t>, } // ------------------------------------------------------------------------------------------------- @@ -495,10 +495,10 @@ pub struct StringRawString<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ArrayType<'t> { - pub r#ref: Box>, - pub l_bracket: Box>, - pub array_type_spec: Box>, - pub r_bracket: Box>, + pub r#ref: Ref<'t>, + pub l_bracket: LBracket<'t>, + pub array_type_spec: ArrayTypeSpec<'t>, + pub r_bracket: RBracket<'t>, } /// @@ -508,10 +508,10 @@ pub struct ArrayType<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ArrayTypeSpec<'t> { - pub array_type_spec_opt: Option>>, - pub ident: Box>, - pub semicolon: Box>, - pub number: Box>, + pub array_type_spec_opt: Option>, + pub ident: Ident<'t>, + pub semicolon: Semicolon<'t>, + pub number: Number<'t>, } /// @@ -521,7 +521,7 @@ pub struct ArrayTypeSpec<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ArrayTypeSpecOpt<'t> { - pub r#ref: Box>, + pub r#ref: Ref<'t>, } /// @@ -531,7 +531,7 @@ pub struct ArrayTypeSpecOpt<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ArrayVal<'t> { - pub array_val_opt: Option>>, + pub array_val_opt: Option>, } /// @@ -541,7 +541,7 @@ pub struct ArrayVal<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ArrayValOpt<'t> { - pub const_val_list: Box>, + pub const_val_list: ConstValList<'t>, } /// @@ -561,7 +561,7 @@ pub struct Assign<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct AttributeArgOpt<'t> { - pub attribute_arg_opt0: Option>>, + pub attribute_arg_opt0: Option>, } /// @@ -571,9 +571,9 @@ pub struct AttributeArgOpt<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct AttributeArgOpt0<'t> { - pub l_paren: Box>, - pub ident: Box>, - pub r_paren: Box>, + pub l_paren: LParen<'t>, + pub ident: Ident<'t>, + pub r_paren: RParen<'t>, } /// @@ -583,7 +583,7 @@ pub struct AttributeArgOpt0<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct AttributeOpt<'t> { - pub attribute_opt0: Option>>, + pub attribute_opt0: Option>, } /// @@ -593,11 +593,11 @@ pub struct AttributeOpt<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct AttributeOpt0<'t> { - pub hash: Box>, - pub l_bracket: Box>, - pub ident: Box>, - pub attribute_arg_opt: Box>, - pub r_bracket: Box>, + pub hash: Hash<'t>, + pub l_bracket: LBracket<'t>, + pub ident: Ident<'t>, + pub attribute_arg_opt: AttributeArgOpt<'t>, + pub r_bracket: RBracket<'t>, } /// @@ -627,7 +627,7 @@ pub struct Comma<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct CommaOpt<'t> { - pub comma_opt0: Option>>, + pub comma_opt0: Option>, } /// @@ -637,7 +637,7 @@ pub struct CommaOpt<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct CommaOpt0<'t> { - pub comma: Box>, + pub comma: Comma<'t>, } /// @@ -659,7 +659,7 @@ pub enum ConstDeclaration<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ConstName<'t> { - pub ident: Box>, + pub ident: Ident<'t>, } /// @@ -669,7 +669,7 @@ pub struct ConstName<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ConstPreamble<'t> { - pub const_name: Box>, + pub const_name: ConstName<'t>, } /// @@ -712,7 +712,7 @@ pub enum ConstVal<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ConstValList<'t> { - pub const_val: Box>, + pub const_val: ConstVal<'t>, pub const_val_list_list: Vec>, } @@ -723,7 +723,7 @@ pub struct ConstValList<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ConstValListList<'t> { - pub const_val: Box>, + pub const_val: ConstVal<'t>, } /// @@ -813,7 +813,7 @@ pub struct LaDfa2Dot<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct LaDfa2DotList<'t> { - pub item: Box>, + pub item: Item<'t>, } /// @@ -823,8 +823,8 @@ pub struct LaDfa2DotList<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct MemberValue<'t> { - pub ident: Box>, - pub const_val: Box>, + pub ident: Ident<'t>, + pub const_val: ConstVal<'t>, } /// @@ -834,7 +834,7 @@ pub struct MemberValue<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct MemberValues<'t> { - pub member_value: Box>, + pub member_value: MemberValue<'t>, pub member_values_list: Vec>, } @@ -845,7 +845,7 @@ pub struct MemberValues<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct MemberValuesList<'t> { - pub member_value: Box>, + pub member_value: MemberValue<'t>, } /// @@ -865,7 +865,7 @@ pub struct Number<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct QualifiedIdent<'t> { - pub ident: Box>, + pub ident: Ident<'t>, pub qualified_ident_list: Vec>, } @@ -876,8 +876,8 @@ pub struct QualifiedIdent<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct QualifiedIdentList<'t> { - pub double_colon: Box>, - pub ident: Box>, + pub double_colon: DoubleColon<'t>, + pub ident: Ident<'t>, } /// @@ -887,8 +887,8 @@ pub struct QualifiedIdentList<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct QualifiedVal<'t> { - pub qualified_ident: Box>, - pub qualified_val_opt: Option>>, + pub qualified_ident: QualifiedIdent<'t>, + pub qualified_val_opt: Option>, } /// @@ -898,7 +898,7 @@ pub struct QualifiedVal<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct QualifiedValOpt<'t> { - pub struct_or_tuple_val: Box>, + pub struct_or_tuple_val: StructOrTupleVal<'t>, } /// @@ -968,10 +968,10 @@ pub struct Ref<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ScopedList<'t> { - pub l_brace: Box>, + pub l_brace: LBrace<'t>, pub scoped_list_items: Box>, - pub comma_opt: Box>, - pub r_brace: Box>, + pub comma_opt: CommaOpt<'t>, + pub r_brace: RBrace<'t>, } /// @@ -981,7 +981,7 @@ pub struct ScopedList<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ScopedListItems<'t> { - pub scoped_qualified_ident: Box>, + pub scoped_qualified_ident: ScopedQualifiedIdent<'t>, pub scoped_list_items_list: Vec>, } @@ -992,7 +992,7 @@ pub struct ScopedListItems<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ScopedListItemsList<'t> { - pub scoped_qualified_ident: Box>, + pub scoped_qualified_ident: ScopedQualifiedIdent<'t>, } /// @@ -1002,8 +1002,8 @@ pub struct ScopedListItemsList<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ScopedQualifiedIdent<'t> { - pub qualified_ident: Box>, - pub scoped_qualified_ident_opt: Option>>, + pub qualified_ident: QualifiedIdent<'t>, + pub scoped_qualified_ident_opt: Option>, } /// @@ -1013,8 +1013,8 @@ pub struct ScopedQualifiedIdent<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct ScopedQualifiedIdentOpt<'t> { - pub double_colon: Box>, - pub scoped_list: Box>, + pub double_colon: DoubleColon<'t>, + pub scoped_list: ScopedList<'t>, } /// @@ -1064,7 +1064,7 @@ pub enum StructOrTupleVal<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct StructVal<'t> { - pub struct_val_opt: Option>>, + pub struct_val_opt: Option>, } /// @@ -1074,7 +1074,7 @@ pub struct StructVal<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct StructValOpt<'t> { - pub member_values: Box>, + pub member_values: MemberValues<'t>, } /// @@ -1084,7 +1084,7 @@ pub struct StructValOpt<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct TupleItems<'t> { - pub type_spec: Box>, + pub type_spec: TypeSpec<'t>, pub tuple_items_list: Vec>, } @@ -1095,8 +1095,8 @@ pub struct TupleItems<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct TupleItemsList<'t> { - pub comma: Box>, - pub type_spec: Box>, + pub comma: Comma<'t>, + pub type_spec: TypeSpec<'t>, } /// @@ -1106,7 +1106,7 @@ pub struct TupleItemsList<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct TupleStructVal<'t> { - pub tuple_val: Box>, + pub tuple_val: TupleVal<'t>, } /// @@ -1116,10 +1116,10 @@ pub struct TupleStructVal<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct TupleType<'t> { - pub l_paren: Box>, - pub tuple_items: Box>, - pub comma_opt: Box>, - pub r_paren: Box>, + pub l_paren: LParen<'t>, + pub tuple_items: TupleItems<'t>, + pub comma_opt: CommaOpt<'t>, + pub r_paren: RParen<'t>, } /// @@ -1129,7 +1129,7 @@ pub struct TupleType<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct TupleVal<'t> { - pub tuple_val_opt: Option>>, + pub tuple_val_opt: Option>, } /// @@ -1139,7 +1139,7 @@ pub struct TupleVal<'t> { #[derive(Builder, Debug, Clone)] #[builder(crate = "parol_runtime::derive_builder")] pub struct TupleValOpt<'t> { - pub const_val_list: Box>, + pub const_val_list: ConstValList<'t>, } /// @@ -1161,8 +1161,8 @@ pub enum TypeSpec<'t> { #[builder(crate = "parol_runtime::derive_builder")] pub struct UseStatement<'t> { pub r#use: Token<'t>, /* use */ - pub scoped_qualified_ident: Box>, - pub semicolon: Box>, + pub scoped_qualified_ident: ScopedQualifiedIdent<'t>, + pub semicolon: Semicolon<'t>, } // ------------------------------------------------------------------------------------------------- @@ -1175,23 +1175,23 @@ pub struct UseStatement<'t> { pub enum ASTType<'t> { ArrayType(ArrayType<'t>), ArrayTypeSpec(ArrayTypeSpec<'t>), - ArrayTypeSpecOpt(Option>>), + ArrayTypeSpecOpt(Option>), ArrayVal(ArrayVal<'t>), - ArrayValOpt(Option>>), + ArrayValOpt(Option>), Assign(Assign<'t>), AttributeArgOpt(AttributeArgOpt<'t>), - AttributeArgOpt0(Option>>), + AttributeArgOpt0(Option>), AttributeOpt(AttributeOpt<'t>), - AttributeOpt0(Option>>), + AttributeOpt0(Option>), Colon(Colon<'t>), Comma(Comma<'t>), CommaOpt(CommaOpt<'t>), - CommaOpt0(Option>>), + CommaOpt0(Option>), ConstDeclaration(ConstDeclaration<'t>), ConstName(ConstName<'t>), ConstPreamble(ConstPreamble<'t>), ConstQualifier(ConstQualifier<'t>), - ConstQualifierOpt(Option>>), + ConstQualifierOpt(Option>), ConstVal(ConstVal<'t>), ConstValList(ConstValList<'t>), ConstValListList(Vec>), @@ -1211,7 +1211,7 @@ pub enum ASTType<'t> { QualifiedIdent(QualifiedIdent<'t>), QualifiedIdentList(Vec>), QualifiedVal(QualifiedVal<'t>), - QualifiedValOpt(Option>>), + QualifiedValOpt(Option>), QuotedString(QuotedString<'t>), RBrace(RBrace<'t>), RBracket(RBracket<'t>), @@ -1222,19 +1222,19 @@ pub enum ASTType<'t> { ScopedListItems(ScopedListItems<'t>), ScopedListItemsList(Vec>), ScopedQualifiedIdent(ScopedQualifiedIdent<'t>), - ScopedQualifiedIdentOpt(Option>>), + ScopedQualifiedIdentOpt(Option>), Semicolon(Semicolon<'t>), Skip(Skip<'t>), String(String<'t>), StructOrTupleVal(StructOrTupleVal<'t>), StructVal(StructVal<'t>), - StructValOpt(Option>>), + StructValOpt(Option>), TupleItems(TupleItems<'t>), TupleItemsList(Vec>), TupleStructVal(TupleStructVal<'t>), TupleType(TupleType<'t>), TupleVal(TupleVal<'t>), - TupleValOpt(Option>>), + TupleValOpt(Option>), TypeSpec(TypeSpec<'t>), UseStatement(UseStatement<'t>), } @@ -1330,12 +1330,8 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { trace!("{}", self.trace_item_stack(context)); let mut la_dfa2_dot_list = pop_item!(self, la_dfa2_dot_list, LaDfa2DotList, context); let item = pop_item!(self, item, Item, context); - // Ignore clipped member 'attribute_opt' self.pop(context); - let la_dfa2_dot_list_0_built = LaDfa2DotList { - item: Box::new(item), - // Ignore clipped member 'attribute_opt' - }; + let la_dfa2_dot_list_0_built = LaDfa2DotList { item }; // Add an element to the vector la_dfa2_dot_list.push(la_dfa2_dot_list_0_built); self.push(ASTType::LaDfa2DotList(la_dfa2_dot_list), context); @@ -1392,14 +1388,14 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let l_bracket = pop_item!(self, l_bracket, LBracket, context); let hash = pop_item!(self, hash, Hash, context); let attribute_opt0_0_built = AttributeOpt0 { - hash: Box::new(hash), - l_bracket: Box::new(l_bracket), - ident: Box::new(ident), - attribute_arg_opt: Box::new(attribute_arg_opt), - r_bracket: Box::new(r_bracket), + hash, + l_bracket, + ident, + attribute_arg_opt, + r_bracket, }; self.push( - ASTType::AttributeOpt0(Some(Box::new(attribute_opt0_0_built))), + ASTType::AttributeOpt0(Some(attribute_opt0_0_built)), context, ); Ok(()) @@ -1451,12 +1447,12 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let ident = pop_item!(self, ident, Ident, context); let l_paren = pop_item!(self, l_paren, LParen, context); let attribute_arg_opt0_0_built = AttributeArgOpt0 { - l_paren: Box::new(l_paren), - ident: Box::new(ident), - r_paren: Box::new(r_paren), + l_paren, + ident, + r_paren, }; self.push( - ASTType::AttributeArgOpt0(Some(Box::new(attribute_arg_opt0_0_built))), + ASTType::AttributeArgOpt0(Some(attribute_arg_opt0_0_built)), context, ); Ok(()) @@ -1482,11 +1478,8 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { fn item_0(&mut self, _use_statement: &ParseTreeType<'t>) -> Result<()> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); - // Ignore clipped member 'use_statement' self.pop(context); - let item_0_built = ItemUseStatement { - // Ignore clipped member 'use_statement' - }; + let item_0_built = ItemUseStatement {}; let item_0_built = Item::UseStatement(item_0_built); // Calling user action here self.user_grammar.item(&item_0_built)?; @@ -1503,9 +1496,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let const_declaration = pop_item!(self, const_declaration, ConstDeclaration, context); - let item_1_built = ItemConstDeclaration { - const_declaration: Box::new(const_declaration), - }; + let item_1_built = ItemConstDeclaration { const_declaration }; let item_1_built = Item::ConstDeclaration(item_1_built); // Calling user action here self.user_grammar.item(&item_1_built)?; @@ -1532,8 +1523,8 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { pop_item!(self, scoped_qualified_ident, ScopedQualifiedIdent, context); let use_statement_built = UseStatement { r#use, - scoped_qualified_ident: Box::new(scoped_qualified_ident), - semicolon: Box::new(semicolon), + scoped_qualified_ident, + semicolon, }; // Calling user action here self.user_grammar.use_statement(&use_statement_built)?; @@ -1557,7 +1548,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { pop_and_reverse_item!(self, qualified_ident_list, QualifiedIdentList, context); let ident = pop_item!(self, ident, Ident, context); let qualified_ident_built = QualifiedIdent { - ident: Box::new(ident), + ident, qualified_ident_list, }; // Calling user action here @@ -1584,8 +1575,8 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let ident = pop_item!(self, ident, Ident, context); let double_colon = pop_item!(self, double_colon, DoubleColon, context); let qualified_ident_list_0_built = QualifiedIdentList { - ident: Box::new(ident), - double_colon: Box::new(double_colon), + ident, + double_colon, }; // Add an element to the vector qualified_ident_list.push(qualified_ident_list_0_built); @@ -1629,7 +1620,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { ); let qualified_ident = pop_item!(self, qualified_ident, QualifiedIdent, context); let scoped_qualified_ident_built = ScopedQualifiedIdent { - qualified_ident: Box::new(qualified_ident), + qualified_ident, scoped_qualified_ident_opt, }; // Calling user action here @@ -1657,11 +1648,11 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let scoped_list = pop_item!(self, scoped_list, ScopedList, context); let double_colon = pop_item!(self, double_colon, DoubleColon, context); let scoped_qualified_ident_opt_0_built = ScopedQualifiedIdentOpt { - double_colon: Box::new(double_colon), - scoped_list: Box::new(scoped_list), + double_colon, + scoped_list, }; self.push( - ASTType::ScopedQualifiedIdentOpt(Some(Box::new(scoped_qualified_ident_opt_0_built))), + ASTType::ScopedQualifiedIdentOpt(Some(scoped_qualified_ident_opt_0_built)), context, ); Ok(()) @@ -1698,10 +1689,10 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let scoped_list_items = pop_item!(self, scoped_list_items, ScopedListItems, context); let l_brace = pop_item!(self, l_brace, LBrace, context); let scoped_list_built = ScopedList { - l_brace: Box::new(l_brace), + l_brace, scoped_list_items: Box::new(scoped_list_items), - comma_opt: Box::new(comma_opt), - r_brace: Box::new(r_brace), + comma_opt, + r_brace, }; // Calling user action here self.user_grammar.scoped_list(&scoped_list_built)?; @@ -1726,7 +1717,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let scoped_qualified_ident = pop_item!(self, scoped_qualified_ident, ScopedQualifiedIdent, context); let scoped_list_items_built = ScopedListItems { - scoped_qualified_ident: Box::new(scoped_qualified_ident), + scoped_qualified_ident, scoped_list_items_list, }; // Calling user action here @@ -1753,11 +1744,9 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { pop_item!(self, scoped_list_items_list, ScopedListItemsList, context); let scoped_qualified_ident = pop_item!(self, scoped_qualified_ident, ScopedQualifiedIdent, context); - // Ignore clipped member 'comma' self.pop(context); let scoped_list_items_list_0_built = ScopedListItemsList { - scoped_qualified_ident: Box::new(scoped_qualified_ident), - // Ignore clipped member 'comma' + scoped_qualified_ident, }; // Add an element to the vector scoped_list_items_list.push(scoped_list_items_list_0_built); @@ -1799,21 +1788,15 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { ) -> Result<()> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); - // Ignore clipped member 'semicolon' self.pop(context); let const_val = pop_item!(self, const_val, ConstVal, context); - // Ignore clipped member 'assign' self.pop(context); - // Ignore clipped member 'type_spec' self.pop(context); let const_preamble = pop_item!(self, const_preamble, ConstPreamble, context); let const_declaration_0_built = ConstDeclarationConstPreambleTypeSpecAssignConstValSemicolon { - const_preamble: Box::new(const_preamble), - // Ignore clipped member 'type_spec' - // Ignore clipped member 'assign' - const_val: Box::new(const_val), - // Ignore clipped member 'semicolon' + const_preamble, + const_val, }; let const_declaration_0_built = ConstDeclaration::ConstPreambleTypeSpecAssignConstValSemicolon( @@ -1841,14 +1824,9 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { ) -> Result<()> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); - // Ignore clipped member 'skip' self.pop(context); - // Ignore clipped member 'const_preamble' self.pop(context); - let const_declaration_1_built = ConstDeclarationConstPreambleSkip { - // Ignore clipped member 'const_preamble' - // Ignore clipped member 'skip' - }; + let const_declaration_1_built = ConstDeclarationConstPreambleSkip {}; let const_declaration_1_built = ConstDeclaration::ConstPreambleSkip(const_declaration_1_built); // Calling user action here @@ -1874,16 +1852,10 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { ) -> Result<()> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); - // Ignore clipped member 'colon' self.pop(context); let const_name = pop_item!(self, const_name, ConstName, context); - // Ignore clipped member 'const_qualifier' self.pop(context); - let const_preamble_built = ConstPreamble { - // Ignore clipped member 'const_qualifier' - const_name: Box::new(const_name), - // Ignore clipped member 'colon' - }; + let const_preamble_built = ConstPreamble { const_name }; // Calling user action here self.user_grammar.const_preamble(&const_preamble_built)?; self.push(ASTType::ConstPreamble(const_preamble_built), context); @@ -1946,7 +1918,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let r#pub = r#pub.token()?.clone(); let const_qualifier_opt_0_built = ConstQualifierOpt { r#pub }; self.push( - ASTType::ConstQualifierOpt(Some(Box::new(const_qualifier_opt_0_built))), + ASTType::ConstQualifierOpt(Some(const_qualifier_opt_0_built)), context, ); Ok(()) @@ -1973,9 +1945,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let ident = pop_item!(self, ident, Ident, context); - let const_name_built = ConstName { - ident: Box::new(ident), - }; + let const_name_built = ConstName { ident }; // Calling user action here self.user_grammar.const_name(&const_name_built)?; self.push(ASTType::ConstName(const_name_built), context); @@ -1991,9 +1961,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let number = pop_item!(self, number, Number, context); - let const_val_0_built = ConstValNumber { - number: Box::new(number), - }; + let const_val_0_built = ConstValNumber { number }; let const_val_0_built = ConstVal::Number(const_val_0_built); // Calling user action here self.user_grammar.const_val(&const_val_0_built)?; @@ -2010,9 +1978,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let string = pop_item!(self, string, String, context); - let const_val_1_built = ConstValString { - string: Box::new(string), - }; + let const_val_1_built = ConstValString { string }; let const_val_1_built = ConstVal::String(const_val_1_built); // Calling user action here self.user_grammar.const_val(&const_val_1_built)?; @@ -2091,19 +2057,11 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { ) -> Result<()> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); - // Ignore clipped member 'r_bracket' self.pop(context); let array_val_opt = pop_item!(self, array_val_opt, ArrayValOpt, context); - // Ignore clipped member 'l_bracket' self.pop(context); - // Ignore clipped member 'r#ref' self.pop(context); - let array_val_built = ArrayVal { - // Ignore clipped member 'r#ref' - // Ignore clipped member 'l_bracket' - array_val_opt, - // Ignore clipped member 'r_bracket' - }; + let array_val_built = ArrayVal { array_val_opt }; // Calling user action here self.user_grammar.array_val(&array_val_built)?; self.push(ASTType::ArrayVal(array_val_built), context); @@ -2122,17 +2080,10 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { ) -> Result<()> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); - // Ignore clipped member 'comma_opt' self.pop(context); let const_val_list = pop_item!(self, const_val_list, ConstValList, context); - let array_val_opt_0_built = ArrayValOpt { - const_val_list: Box::new(const_val_list), - // Ignore clipped member 'comma_opt' - }; - self.push( - ASTType::ArrayValOpt(Some(Box::new(array_val_opt_0_built))), - context, - ); + let array_val_opt_0_built = ArrayValOpt { const_val_list }; + self.push(ASTType::ArrayValOpt(Some(array_val_opt_0_built)), context); Ok(()) } @@ -2164,7 +2115,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { pop_and_reverse_item!(self, const_val_list_list, ConstValListList, context); let const_val = pop_item!(self, const_val, ConstVal, context); let const_val_list_built = ConstValList { - const_val: Box::new(const_val), + const_val, const_val_list_list, }; // Calling user action here @@ -2189,12 +2140,8 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let mut const_val_list_list = pop_item!(self, const_val_list_list, ConstValListList, context); let const_val = pop_item!(self, const_val, ConstVal, context); - // Ignore clipped member 'comma' self.pop(context); - let const_val_list_list_0_built = ConstValListList { - const_val: Box::new(const_val), - // Ignore clipped member 'comma' - }; + let const_val_list_list_0_built = ConstValListList { const_val }; // Add an element to the vector const_val_list_list.push(const_val_list_list_0_built); self.push(ASTType::ConstValListList(const_val_list_list), context); @@ -2230,16 +2177,10 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { ) -> Result<()> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); - // Ignore clipped member 'r_paren' self.pop(context); let tuple_val_opt = pop_item!(self, tuple_val_opt, TupleValOpt, context); - // Ignore clipped member 'l_paren' self.pop(context); - let tuple_val_built = TupleVal { - // Ignore clipped member 'l_paren' - tuple_val_opt, - // Ignore clipped member 'r_paren' - }; + let tuple_val_built = TupleVal { tuple_val_opt }; // Calling user action here self.user_grammar.tuple_val(&tuple_val_built)?; self.push(ASTType::TupleVal(tuple_val_built), context); @@ -2258,17 +2199,10 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { ) -> Result<()> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); - // Ignore clipped member 'comma_opt' self.pop(context); let const_val_list = pop_item!(self, const_val_list, ConstValList, context); - let tuple_val_opt_0_built = TupleValOpt { - const_val_list: Box::new(const_val_list), - // Ignore clipped member 'comma_opt' - }; - self.push( - ASTType::TupleValOpt(Some(Box::new(tuple_val_opt_0_built))), - context, - ); + let tuple_val_opt_0_built = TupleValOpt { const_val_list }; + self.push(ASTType::TupleValOpt(Some(tuple_val_opt_0_built)), context); Ok(()) } @@ -2299,7 +2233,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let qualified_val_opt = pop_item!(self, qualified_val_opt, QualifiedValOpt, context); let qualified_ident = pop_item!(self, qualified_ident, QualifiedIdent, context); let qualified_val_built = QualifiedVal { - qualified_ident: Box::new(qualified_ident), + qualified_ident, qualified_val_opt, }; // Calling user action here @@ -2318,10 +2252,10 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { trace!("{}", self.trace_item_stack(context)); let struct_or_tuple_val = pop_item!(self, struct_or_tuple_val, StructOrTupleVal, context); let qualified_val_opt_0_built = QualifiedValOpt { - struct_or_tuple_val: Box::new(struct_or_tuple_val), + struct_or_tuple_val, }; self.push( - ASTType::QualifiedValOpt(Some(Box::new(qualified_val_opt_0_built))), + ASTType::QualifiedValOpt(Some(qualified_val_opt_0_built)), context, ); Ok(()) @@ -2371,9 +2305,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let tuple_struct_val = pop_item!(self, tuple_struct_val, TupleStructVal, context); - let struct_or_tuple_val_1_built = StructOrTupleValTupleStructVal { - tuple_struct_val: Box::new(tuple_struct_val), - }; + let struct_or_tuple_val_1_built = StructOrTupleValTupleStructVal { tuple_struct_val }; let struct_or_tuple_val_1_built = StructOrTupleVal::TupleStructVal(struct_or_tuple_val_1_built); // Calling user action here @@ -2399,16 +2331,10 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { ) -> Result<()> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); - // Ignore clipped member 'r_brace' self.pop(context); let struct_val_opt = pop_item!(self, struct_val_opt, StructValOpt, context); - // Ignore clipped member 'l_brace' self.pop(context); - let struct_val_built = StructVal { - // Ignore clipped member 'l_brace' - struct_val_opt, - // Ignore clipped member 'r_brace' - }; + let struct_val_built = StructVal { struct_val_opt }; // Calling user action here self.user_grammar.struct_val(&struct_val_built)?; self.push(ASTType::StructVal(struct_val_built), context); @@ -2427,17 +2353,10 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { ) -> Result<()> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); - // Ignore clipped member 'comma' self.pop(context); let member_values = pop_item!(self, member_values, MemberValues, context); - let struct_val_opt_0_built = StructValOpt { - member_values: Box::new(member_values), - // Ignore clipped member 'comma' - }; - self.push( - ASTType::StructValOpt(Some(Box::new(struct_val_opt_0_built))), - context, - ); + let struct_val_opt_0_built = StructValOpt { member_values }; + self.push(ASTType::StructValOpt(Some(struct_val_opt_0_built)), context); Ok(()) } @@ -2469,7 +2388,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { pop_and_reverse_item!(self, member_values_list, MemberValuesList, context); let member_value = pop_item!(self, member_value, MemberValue, context); let member_values_built = MemberValues { - member_value: Box::new(member_value), + member_value, member_values_list, }; // Calling user action here @@ -2493,12 +2412,8 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { trace!("{}", self.trace_item_stack(context)); let mut member_values_list = pop_item!(self, member_values_list, MemberValuesList, context); let member_value = pop_item!(self, member_value, MemberValue, context); - // Ignore clipped member 'comma' self.pop(context); - let member_values_list_0_built = MemberValuesList { - member_value: Box::new(member_value), - // Ignore clipped member 'comma' - }; + let member_values_list_0_built = MemberValuesList { member_value }; // Add an element to the vector member_values_list.push(member_values_list_0_built); self.push(ASTType::MemberValuesList(member_values_list), context); @@ -2535,14 +2450,9 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let const_val = pop_item!(self, const_val, ConstVal, context); - // Ignore clipped member 'colon' self.pop(context); let ident = pop_item!(self, ident, Ident, context); - let member_value_built = MemberValue { - ident: Box::new(ident), - // Ignore clipped member 'colon' - const_val: Box::new(const_val), - }; + let member_value_built = MemberValue { ident, const_val }; // Calling user action here self.user_grammar.member_value(&member_value_built)?; self.push(ASTType::MemberValue(member_value_built), context); @@ -2558,9 +2468,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let tuple_val = pop_item!(self, tuple_val, TupleVal, context); - let tuple_struct_val_built = TupleStructVal { - tuple_val: Box::new(tuple_val), - }; + let tuple_struct_val_built = TupleStructVal { tuple_val }; // Calling user action here self.user_grammar .tuple_struct_val(&tuple_struct_val_built)?; @@ -2577,9 +2485,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let qualified_ident = pop_item!(self, qualified_ident, QualifiedIdent, context); - let type_spec_0_built = TypeSpecQualifiedIdent { - qualified_ident: Box::new(qualified_ident), - }; + let type_spec_0_built = TypeSpecQualifiedIdent { qualified_ident }; let type_spec_0_built = TypeSpec::QualifiedIdent(type_spec_0_built); // Calling user action here self.user_grammar.type_spec(&type_spec_0_built)?; @@ -2596,9 +2502,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let array_type = pop_item!(self, array_type, ArrayType, context); - let type_spec_1_built = TypeSpecArrayType { - array_type: Box::new(array_type), - }; + let type_spec_1_built = TypeSpecArrayType { array_type }; let type_spec_1_built = TypeSpec::ArrayType(type_spec_1_built); // Calling user action here self.user_grammar.type_spec(&type_spec_1_built)?; @@ -2644,10 +2548,10 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let l_bracket = pop_item!(self, l_bracket, LBracket, context); let r#ref = pop_item!(self, r#ref, Ref, context); let array_type_built = ArrayType { - r#ref: Box::new(r#ref), - l_bracket: Box::new(l_bracket), - array_type_spec: Box::new(array_type_spec), - r_bracket: Box::new(r_bracket), + r#ref, + l_bracket, + array_type_spec, + r_bracket, }; // Calling user action here self.user_grammar.array_type(&array_type_built)?; @@ -2675,9 +2579,9 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let array_type_spec_opt = pop_item!(self, array_type_spec_opt, ArrayTypeSpecOpt, context); let array_type_spec_built = ArrayTypeSpec { array_type_spec_opt, - ident: Box::new(ident), - semicolon: Box::new(semicolon), - number: Box::new(number), + ident, + semicolon, + number, }; // Calling user action here self.user_grammar.array_type_spec(&array_type_spec_built)?; @@ -2694,11 +2598,9 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let r#ref = pop_item!(self, r#ref, Ref, context); - let array_type_spec_opt_0_built = ArrayTypeSpecOpt { - r#ref: Box::new(r#ref), - }; + let array_type_spec_opt_0_built = ArrayTypeSpecOpt { r#ref }; self.push( - ASTType::ArrayTypeSpecOpt(Some(Box::new(array_type_spec_opt_0_built))), + ASTType::ArrayTypeSpecOpt(Some(array_type_spec_opt_0_built)), context, ); Ok(()) @@ -2735,10 +2637,10 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let tuple_items = pop_item!(self, tuple_items, TupleItems, context); let l_paren = pop_item!(self, l_paren, LParen, context); let tuple_type_built = TupleType { - l_paren: Box::new(l_paren), - tuple_items: Box::new(tuple_items), - comma_opt: Box::new(comma_opt), - r_paren: Box::new(r_paren), + l_paren, + tuple_items, + comma_opt, + r_paren, }; // Calling user action here self.user_grammar.tuple_type(&tuple_type_built)?; @@ -2762,7 +2664,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { pop_and_reverse_item!(self, tuple_items_list, TupleItemsList, context); let type_spec = pop_item!(self, type_spec, TypeSpec, context); let tuple_items_built = TupleItems { - type_spec: Box::new(type_spec), + type_spec, tuple_items_list, }; // Calling user action here @@ -2787,10 +2689,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let mut tuple_items_list = pop_item!(self, tuple_items_list, TupleItemsList, context); let type_spec = pop_item!(self, type_spec, TypeSpec, context); let comma = pop_item!(self, comma, Comma, context); - let tuple_items_list_0_built = TupleItemsList { - type_spec: Box::new(type_spec), - comma: Box::new(comma), - }; + let tuple_items_list_0_built = TupleItemsList { type_spec, comma }; // Add an element to the vector tuple_items_list.push(tuple_items_list_0_built); self.push(ASTType::TupleItemsList(tuple_items_list), context); @@ -2851,13 +2750,8 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let comma = pop_item!(self, comma, Comma, context); - let comma_opt0_0_built = CommaOpt0 { - comma: Box::new(comma), - }; - self.push( - ASTType::CommaOpt0(Some(Box::new(comma_opt0_0_built))), - context, - ); + let comma_opt0_0_built = CommaOpt0 { comma }; + self.push(ASTType::CommaOpt0(Some(comma_opt0_0_built)), context); Ok(()) } @@ -2962,9 +2856,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let quoted_string = pop_item!(self, quoted_string, QuotedString, context); - let string_0_built = StringQuotedString { - quoted_string: Box::new(quoted_string), - }; + let string_0_built = StringQuotedString { quoted_string }; let string_0_built = String::QuotedString(string_0_built); // Calling user action here self.user_grammar.string(&string_0_built)?; @@ -2981,9 +2873,7 @@ impl<'t, 'u> LaDfa2DotGrammarAuto<'t, 'u> { let context = function_name!(); trace!("{}", self.trace_item_stack(context)); let raw_string = pop_item!(self, raw_string, RawString, context); - let string_1_built = StringRawString { - raw_string: Box::new(raw_string), - }; + let string_1_built = StringRawString { raw_string }; let string_1_built = String::RawString(string_1_built); // Calling user action here self.user_grammar.string(&string_1_built)?;