3 ms·
The code in the OP appears to largely be a custom-built DSL designed to emulate XML. One can tell it's a custom DSL by dint of looking at the `mox!()` invocatio
by kibwen 7y ago
The code in the OP appears to largely be a custom-built DSL designed to emulate XML. One can tell it's a custom DSL by dint of looking at the `mox!()` invocation; any identifier followed by a bang in Rust is a macro (Scheme-style syntax-aware macros, not C-style textual macros), which have loose parsing rules to allow for such DSLs to be defined.
Rust does have plenty of symbols (nearly all of which are lifted directly from C or C++, with the same or analogous meanings), but such extensive DSLs are rarely encountered in the course of everyday use of the language.