From 6c19b91eb022892d094fe7b39e4c83a7deb4b68f Mon Sep 17 00:00:00 2001 From: Matt Stark Date: Fri, 4 Oct 2024 11:13:06 +1000 Subject: [PATCH] Fix: Disallow revset names starting with a number. --- lib/src/revset.pest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/revset.pest b/lib/src/revset.pest index 7fd6aa09e1a..2705b512d2d 100644 --- a/lib/src/revset.pest +++ b/lib/src/revset.pest @@ -64,7 +64,7 @@ compat_sub_op = { "-" } infix_op = _{ union_op | intersection_op | difference_op | compat_add_op | compat_sub_op } function = { function_name ~ "(" ~ whitespace* ~ function_arguments ~ whitespace* ~ ")" } -function_name = @{ (ASCII_ALPHANUMERIC | "_")+ } +function_name = @{ (ASCII_ALPHA | "_") ~ (ASCII_ALPHANUMERIC | "_")* } keyword_argument = { identifier ~ whitespace* ~ "=" ~ whitespace* ~ expression } argument = _{ keyword_argument | expression } function_arguments = {