Remove indirection.

This commit is contained in:
Stephen Chung
2023-03-23 13:37:10 +08:00
parent 3d06ddc6e2
commit 2e724b804e
15 changed files with 56 additions and 58 deletions

View File

@@ -171,7 +171,7 @@ impl Engine {
Some(token) if token.is_standard_keyword() => {
if !self
.disabled_symbols
.as_deref()
.as_ref()
.map_or(false, |m| m.contains(token.literal_syntax()))
{
return Err(format!("'{keyword}' is a reserved keyword"));
@@ -181,7 +181,7 @@ impl Engine {
Some(token) if token.is_standard_symbol() => {
if !self
.disabled_symbols
.as_deref()
.as_ref()
.map_or(false, |m| m.contains(token.literal_syntax()))
{
return Err(format!("'{keyword}' is a reserved operator"));
@@ -191,7 +191,7 @@ impl Engine {
Some(token)
if !self
.disabled_symbols
.as_deref()
.as_ref()
.map_or(false, |m| m.contains(token.literal_syntax())) =>
{
return Err(format!("'{keyword}' is a reserved symbol"))