Short redirection syntax (#8503)

This one's pretty clear from the diff! It's more of a language design
discussion.
This commit is contained in:
Dan Davison 2023-03-17 19:57:37 +00:00 committed by GitHub
parent 14bf0b000e
commit 77e9f8d7df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,21 +247,21 @@ pub fn lex_item(
} }
match &input[(span.start - span_offset)..(span.end - span_offset)] { match &input[(span.start - span_offset)..(span.end - span_offset)] {
b"out>" => ( b"out>" | b"o>" => (
Token { Token {
contents: TokenContents::OutGreaterThan, contents: TokenContents::OutGreaterThan,
span, span,
}, },
None, None,
), ),
b"err>" => ( b"err>" | b"e>" => (
Token { Token {
contents: TokenContents::ErrGreaterThan, contents: TokenContents::ErrGreaterThan,
span, span,
}, },
None, None,
), ),
b"out+err>" | b"err+out>" => ( b"out+err>" | b"err+out>" | b"o+e>" | b"e+o>" => (
Token { Token {
contents: TokenContents::OutErrGreaterThan, contents: TokenContents::OutErrGreaterThan,
span, span,