Use ** for power/exponentiation.

This commit is contained in:
Stephen Chung
2021-02-10 12:41:27 +08:00
parent 8c26b49a39
commit 61638d6566
6 changed files with 67 additions and 53 deletions

View File

@@ -288,8 +288,8 @@ impl Engine {
return Err(format!("'{}' is a reserved keyword", keyword).into());
}
}
// Active standard operators cannot be made custom
Some(token) if token.is_operator() => {
// Active standard symbols cannot be made custom
Some(token) if token.is_symbol() => {
if !self.disabled_symbols.contains(token.syntax().as_ref()) {
return Err(format!("'{}' is a reserved operator", keyword).into());
}