Reserve ** operator.
This commit is contained in:
parent
037e8334d4
commit
9dceeaf114
@ -60,6 +60,7 @@ Symbols and Patterns
|
|||||||
| `--` | decrement | _reserved_ |
|
| `--` | decrement | _reserved_ |
|
||||||
| `..` | range | _reserved_ |
|
| `..` | range | _reserved_ |
|
||||||
| `...` | range | _reserved_ |
|
| `...` | range | _reserved_ |
|
||||||
|
| `**` | exponentiation | _reserved_ |
|
||||||
| `#` | hash | _reserved_ |
|
| `#` | hash | _reserved_ |
|
||||||
| `@` | at | _reserved_ |
|
| `@` | at | _reserved_ |
|
||||||
| `$` | dollar | _reserved_ |
|
| `$` | dollar | _reserved_ |
|
||||||
|
@ -1231,6 +1231,10 @@ fn get_next_token_inner(
|
|||||||
('-', _) if !state.non_unary => return Some((Token::UnaryMinus, start_pos)),
|
('-', _) if !state.non_unary => return Some((Token::UnaryMinus, start_pos)),
|
||||||
('-', _) => return Some((Token::Minus, start_pos)),
|
('-', _) => return Some((Token::Minus, start_pos)),
|
||||||
|
|
||||||
|
('*', '*') => {
|
||||||
|
eat_next(stream, pos);
|
||||||
|
return Some((Token::Reserved("**".into()), start_pos));
|
||||||
|
}
|
||||||
('*', ')') => {
|
('*', ')') => {
|
||||||
eat_next(stream, pos);
|
eat_next(stream, pos);
|
||||||
return Some((Token::Reserved("*)".into()), start_pos));
|
return Some((Token::Reserved("*)".into()), start_pos));
|
||||||
|
Loading…
Reference in New Issue
Block a user