Prepare parser for function definitions

This commit is contained in:
Joscha 2022-11-19 18:58:39 +01:00
parent 86006933d7
commit 9a1bb92dfe
4 changed files with 22 additions and 2 deletions

View file

@ -46,7 +46,7 @@ pub fn ident() -> BoxedParser<'static, char, Ident, Error> {
.try_map(|name, span| {
if matches!(
&name as &str,
"nil" | "true" | "false" | "local" | "not" | "and" | "or"
"nil" | "true" | "false" | "local" | "function" | "not" | "and" | "or"
) {
Err(Simple::custom(span, "identifier uses reserved name"))
} else {