Reserve |> and <| symbols.
This commit is contained in:
parent
b35a9762fb
commit
1bba34b9b7
@ -65,6 +65,7 @@ Enhancements
|
|||||||
* The code base is cleaner by running it through Clippy.
|
* The code base is cleaner by running it through Clippy.
|
||||||
* `ParseError::err_type` and `ParseError::position` are added for convenience.
|
* `ParseError::err_type` and `ParseError::position` are added for convenience.
|
||||||
* The source of an `AST` compiled from a script file is set to the file's path.
|
* The source of an `AST` compiled from a script file is set to the file's path.
|
||||||
|
* `|>` and `<|` are now reserved symbols.
|
||||||
|
|
||||||
|
|
||||||
Version 1.8.0
|
Version 1.8.0
|
||||||
|
@ -2036,6 +2036,10 @@ fn get_next_token_inner(
|
|||||||
start_pos,
|
start_pos,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
('<', '|') => {
|
||||||
|
eat_next(stream, pos);
|
||||||
|
return Some((Token::Reserved("<|".into()), start_pos));
|
||||||
|
}
|
||||||
('<', ..) => return Some((Token::LessThan, start_pos)),
|
('<', ..) => return Some((Token::LessThan, start_pos)),
|
||||||
|
|
||||||
('>', '=') => {
|
('>', '=') => {
|
||||||
@ -2067,7 +2071,10 @@ fn get_next_token_inner(
|
|||||||
|
|
||||||
return Some((Token::NotEqualsTo, start_pos));
|
return Some((Token::NotEqualsTo, start_pos));
|
||||||
}
|
}
|
||||||
('!', '.') => return Some((Token::Reserved("!.".into()), start_pos)),
|
('!', '.') => {
|
||||||
|
eat_next(stream, pos);
|
||||||
|
return Some((Token::Reserved("!.".into()), start_pos));
|
||||||
|
}
|
||||||
('!', ..) => return Some((Token::Bang, start_pos)),
|
('!', ..) => return Some((Token::Bang, start_pos)),
|
||||||
|
|
||||||
('|', '|') => {
|
('|', '|') => {
|
||||||
@ -2078,6 +2085,10 @@ fn get_next_token_inner(
|
|||||||
eat_next(stream, pos);
|
eat_next(stream, pos);
|
||||||
return Some((Token::OrAssign, start_pos));
|
return Some((Token::OrAssign, start_pos));
|
||||||
}
|
}
|
||||||
|
('|', '>') => {
|
||||||
|
eat_next(stream, pos);
|
||||||
|
return Some((Token::Reserved("|>".into()), start_pos));
|
||||||
|
}
|
||||||
('|', ..) => return Some((Token::Pipe, start_pos)),
|
('|', ..) => return Some((Token::Pipe, start_pos)),
|
||||||
|
|
||||||
('&', '&') => {
|
('&', '&') => {
|
||||||
|
Loading…
Reference in New Issue
Block a user