Skip to content

Commit

Permalink
Change an error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivorforce committed Dec 9, 2024
1 parent aec09fe commit 5cec704
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/resolver/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ impl <'a> GlobalResolver<'a> {
let parsed = expressions::parse(e, &self.global_variables.grammar)?;

let expressions::Value::FunctionCall(target, call_struct) = &parsed.value else {
return Err(RuntimeError::error("Statement is not supported in a global context.").to_array())
return Err(RuntimeError::error("Unexpected statement in global context.").to_array())
};

let expressions::Value::MacroIdentifier(macro_name) = &target.value else {
return Err(RuntimeError::error("Statement is not supported in a global context.").to_array())
return Err(RuntimeError::error("Unexpected statement in global context.").to_array())
};

match macro_name.as_str() {
Expand Down Expand Up @@ -232,7 +232,7 @@ impl <'a> GlobalResolver<'a> {
}
_ => {
return Err(
RuntimeError::error("Statement is not supported in a global context.").to_array()
RuntimeError::error("Unexpected statement in global context.").to_array()
)
}
}
Expand Down

0 comments on commit 5cec704

Please sign in to comment.