Prepare parser for function definitions
This commit is contained in:
parent
86006933d7
commit
9a1bb92dfe
4 changed files with 22 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue