Add has_override and script calls to function resolution cache.

This commit is contained in:
Stephen Chung
2021-02-07 15:09:27 +08:00
parent a54b88a8b0
commit 7b87f81850
6 changed files with 96 additions and 46 deletions

View File

@@ -1731,8 +1731,7 @@ fn parse_binary_op(
.engine
.custom_keywords
.get(c)
.map(Option::is_some)
.unwrap_or(false)
.map_or(false, Option::is_some)
{
state.engine.custom_keywords.get(c).unwrap().unwrap().get()
} else {
@@ -1763,8 +1762,7 @@ fn parse_binary_op(
.engine
.custom_keywords
.get(c)
.map(Option::is_some)
.unwrap_or(false)
.map_or(false, Option::is_some)
{
state.engine.custom_keywords.get(c).unwrap().unwrap().get()
} else {
@@ -1875,8 +1873,7 @@ fn parse_binary_op(
.engine
.custom_keywords
.get(&s)
.map(Option::is_some)
.unwrap_or(false) =>
.map_or(false, Option::is_some) =>
{
let hash_script = if is_valid_identifier(s.chars()) {
// Accept non-native functions for custom operators