diff --git a/doc/src/appendix/operators.md b/doc/src/appendix/operators.md index 7f20f003..ff9b7fed 100644 --- a/doc/src/appendix/operators.md +++ b/doc/src/appendix/operators.md @@ -60,6 +60,7 @@ Symbols and Patterns | `--` | decrement | _reserved_ | | `..` | range | _reserved_ | | `...` | range | _reserved_ | +| `**` | exponentiation | _reserved_ | | `#` | hash | _reserved_ | | `@` | at | _reserved_ | | `$` | dollar | _reserved_ | diff --git a/src/token.rs b/src/token.rs index 428067ef..eb2d63f3 100644 --- a/src/token.rs +++ b/src/token.rs @@ -1231,6 +1231,10 @@ fn get_next_token_inner( ('-', _) if !state.non_unary => return Some((Token::UnaryMinus, start_pos)), ('-', _) => return Some((Token::Minus, start_pos)), + ('*', '*') => { + eat_next(stream, pos); + return Some((Token::Reserved("**".into()), start_pos)); + } ('*', ')') => { eat_next(stream, pos); return Some((Token::Reserved("*)".into()), start_pos));