forked from extern/nushell
4d3e7efe25
Previously, there was a single parsing rule for "bare words" that applied to both internal and external commands. This meant that, because `cargo +nightly` needed to work, we needed to add `+` as a valid character in bare words. The number of characters continued to grow, and the situation was becoming untenable. The current strategy would eventually eat up all syntax and make it impossible to add syntax like `@foo` to internal commands. This patch significantly restricts bare words and introduces a new token type (`ExternalWord`). An `ExternalWord` expands to an error in the internal syntax, but expands to a bare word in the external syntax. `ExternalWords` are highlighted in grey in the shell. |
||
---|---|---|
.. | ||
hir | ||
parse | ||
deserializer.rs | ||
hir.rs | ||
parse_command.rs | ||
parse.rs | ||
registry.rs |